Title: Gallery thumbnails too large
Last modified: January 2, 2019

---

# Gallery thumbnails too large

 *  [mattisgbg](https://wordpress.org/support/users/mattisgbg/)
 * (@mattisgbg)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/gallery-thumbnails-too-large/)
 * I’m trying to do new galleries in WordPress 5, but I have two problems.
 * On this page, the last image happens to be alone in its row, making it fill the
   whole width. I would like it to be the same size as the other thumbnails. How
   do I do that? I have other galleries on my site that were created in earlier 
   versions, and they look correct.
    _[ redundant link removed ]_
 * Also, the thumbnails are not square, but vary in size from row to row. How do
   I get them all to be the same size?
 * Thanks,
 * /Mattis
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fgallery-thumbnails-too-large%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [HudsonValleyWebDesign](https://wordpress.org/support/users/jaycbrf/)
 * (@jaycbrf)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/gallery-thumbnails-too-large/#post-11044547)
 * How content is displayed is controlled by the theme. Thumbnail sizes are defined
   in the theme’s functions file.
    Theme support is found here: [https://wordpress.org/support/theme/hueman](https://wordpress.org/support/theme/hueman)
 * You can control the image size through CSS also. If you set a max-width that 
   will not happen.
 *  [mrtom414](https://wordpress.org/support/users/mrtom414/)
 * (@mrtom414)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/gallery-thumbnails-too-large/#post-11045435)
 * You would probably have to look at each media query and adust the max size like
   this code.
 *     ```
       @media (min-width: 600px)
       .wp-block-gallery.columns-4 .blocks-gallery-image, .wp-block-gallery.columns-4 .blocks-gallery-item {
           width: calc((100% - 16px * 3)/ 4);
           margin-right: 16px;
           max-width: 23%;
           height:auto;
       }
       ```
   
 * if you are going to adjust the thumbnail size in functions.php you might want
   to add the plugin regenerate thumbnails and let it regenerate all your thumbnails.
   [https://wordpress.org/plugins/regenerate-thumbnails/](https://wordpress.org/plugins/regenerate-thumbnails/)
    -  This reply was modified 7 years, 4 months ago by [mrtom414](https://wordpress.org/support/users/mrtom414/).
 *  Thread Starter [mattisgbg](https://wordpress.org/support/users/mattisgbg/)
 * (@mattisgbg)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/gallery-thumbnails-too-large/#post-11045677)
 * I probably should have provided this from the start, but this is a link to a 
   gallery that I created earlier, that looks exactly like I want it to. But the
   new galleries that I create do not look the same.
 * [https://mattis.se/2017/01/22/bilder-fran-taiwan/](https://mattis.se/2017/01/22/bilder-fran-taiwan/)
 * The last image is also alone, but is still the same size as the other thumbnails.
 * I had a look at the html in the editor, but the new syntax is very different 
   from the old one.
 * I also noticed just now that whichever image I click on in the gallery it’s always
   the first one that opens.
    -  This reply was modified 7 years, 4 months ago by [mattisgbg](https://wordpress.org/support/users/mattisgbg/).
    -  This reply was modified 7 years, 4 months ago by [mattisgbg](https://wordpress.org/support/users/mattisgbg/).
 *  [mrtom414](https://wordpress.org/support/users/mrtom414/)
 * (@mrtom414)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/gallery-thumbnails-too-large/#post-11048321)
 * the max-width will keep it from expending all the way across the page. since 
   there are 4 images on the level when it above 600px you will need to keep the
   li items to below 1/4 the size of the overall length. if there where 3 images
   across you would have to make it less then 1/3 and so on. I set the max width
   to 23% because there is a margin added to the image to form the gap between images.
 * if you adjust each of the media queries by adding the max-width: you should be
   close. You should be able to add something to customize additional CSS.
 *     ```
       @media (min-width: 600px){
       .wp-block-gallery.columns-4 .blocks-gallery-image, .wp-block-gallery.columns-4 .blocks-gallery-item {
           max-width: 23%;
           height:auto;
       }
       }
       ```
   
 *  Thread Starter [mattisgbg](https://wordpress.org/support/users/mattisgbg/)
 * (@mattisgbg)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/gallery-thumbnails-too-large/#post-11055625)
 * So the gallery in WordPress 5 requires other CSS definitions than the gallery
   in earlier versions?
 *  Thread Starter [mattisgbg](https://wordpress.org/support/users/mattisgbg/)
 * (@mattisgbg)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/gallery-thumbnails-too-large/#post-11058006)
 * I changed into using the classic editor instead of the new one in WordPress 5,
   and now I can create galleries that look just the way I want them to.
 * The galleries in WordPress 5 blocks obviously uses different formatting than 
   the classic ones.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Gallery thumbnails too large’ is closed to new replies.

## Tags

 * [galleries](https://wordpress.org/support/topic-tag/galleries/)
 * [gallery](https://wordpress.org/support/topic-tag/gallery/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [mattisgbg](https://wordpress.org/support/users/mattisgbg/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/gallery-thumbnails-too-large/#post-11058006)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
