div.your-class {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #eee;
}
div.your-class > div {
    width: 20%;
    border: 1px solid #eee;
    text-align: center;
}
div.your-class > div a img {
    height: 9.5vw;
    max-height: 140px;
    margin: auto;
}
@media screen and (max-width: 768px){
div.your-class > div {
    width: 33%;
}
div.your-class > div a img {
    height: 20vw;
}
}

