How to Make WordPress Default gallery responsive on mobile?

They achieve this by using CSS Media Queries .

Here are the specific ones controlling the gallery width.

@media(max-width: 720px){
    .gallery-item{
        max-width: 50%;
    }
}

@media(max-width: 480px){
    .gallery-item{
        max-width: 100%;
    }
}

Add those into your style.css and see if they work.

Leave a Comment