.gallery-icon img{ width:175px; height: 187px; } @media (max-width: 1024px){ .gallery-columns-4 .gallery-item{ max-width:50% !important; } .gallery-icon img{ height: auto !important; } }