Look awesome without hiring a designer.

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

by Oct 26, 2019Code Snippets

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

Super Helpful Posts

About Ysmay

Ysmay has been building websites professionally since 1999, and is the co-owner of Agency 109.

When she’s not building websites, she can be found mentoring fellow designers, playing Pokemon Go, and listening to gangsta rap.

You can connect with Ysmay futher on her personal site Ysmay.com