The ideal size for the default gallery images is 400x284px or larger, but if you use larger images you should use the same aspect ratio. The aspect ratio by default would be 400px width by 284px height which would give 100:71. So an image 1000px wide should be 710 pixels high. This will mean your images are not cropped in the thumbnail grid.

If you want to change the gallery image sizes, you can add the following CSS code into your Divi child theme CSS file or Theme Customizer Custom CSS box. Just edit the width and height pixel values to your own image sizes. This does not regenerate the image sizes used but just resizes in the browser using the CSS.

Set the image gallery image widths

.et_pb_gallery_grid .et_pb_gallery_item,
.et_pb_gallery_grid .column_width,
.et_pb_gallery_grid .et_pb_gallery_image,
.et_pb_gallery_grid .et_pb_gallery_image.portrait img
{
width: 220px;
}
.et_pb_gallery_grid .et_pb_gallery_image img
{
min-width: 220px;
}

Set the image gallery image height

.et_pb_gallery_grid .et_pb_gallery_image,
.et_pb_gallery_grid .et_pb_gallery_image.landscape img
{
height: 220px;
}
.et_pb_gallery_grid .et_pb_gallery_image img
{
min-height: 220px;
}

Set the spacing between image gallery images

.et_pb_gallery_grid .gutter_width { width: 15px; }
 

Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close