How to remove featured image constraints in Divi’s blog module

Oct 26, 2019

Disclaimer: This site is a labour of love, but love doesn’t buy me matcha lattes. Affiliate commissions for awesome internet tools, on the other hand, totally buys me matcha lattes. This post probably contains some affiliate links. Read my affiliate disclaimer here.

One of my biggest frustrations with Divi is this:

The blog fullwidth layout defaults to pulling in the pre-programmed image ratios that limit the creativity of your design work. Who among us wants to stick to 4:3, 16:9, or 3:4 all of the time?

There are some designs that — in order for the design to fully come to life — needs the blog module images to be at a specific ratio. Such as 1:1. The ability to default to square images in the Divi blog module is mysteriously missing from Divi.

I expected this to have been resolved in Divi 4.0, but it wasn’t.

Luckily, you can solve this with just a few lines of code.

Go into functions.php in your site (preferably your child theme) and add this code at the bottom of the file:


function blog_grid_image_size($size) { return '9999'; } 
add_filter( 'et_pb_blog_image_height', 'blog_grid_image_size' ); 
add_filter( 'et_pb_blog_image_width', 'blog_grid_image_size' );


Hope this helps! If you use this code, let me know in the comments below and post a link to your blog so I can see it in action. 🙂


Leave a Reply