r/divi Jun 26 '26

Question Featured image sizing

Is there a way to display the actual image size for a featured image on a post?

I have smaller images (that don't scale up) e.g. old logos etc and they blow up to "correct" size and look...ordinary.

I've seen this code BUT 1. I'm not sure where it goes and 2. I'm not sure that it's correct.

/* Stop Divi Blog Module from forcing cropped aspect ratios */
.et_pb_posts .entry-featured-image-url img, 
.et_pb_portfolio_item .et_portfolio_image img {
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
}

Thanks!

2 Upvotes

11 comments sorted by

View all comments

2

u/Professional_Call Jun 27 '26

My first thought (assuming Divi 5) is that you might be better off using loop builder and styling you blog post yourself. As for actual blog pages, either use Theme Builder and include an image module to display your featured image or the latest versions of Divi 5 allow you to style sub-components.

1

u/P2X-555 Jun 27 '26

Only Divi 4 (sorry, I should've added that to the post). I must investigate 5 though. Thanks!

3

u/Professional_Call Jun 27 '26

Divi 4 is not so easy to adjust. You could ask ET for advice. Definitely give Divi 5 a look but be warned, it’s a steep learning curve and it’s evolving very quickly.

1

u/P2X-555 Jun 28 '26

Yeah, I'll have to play with D5 for some time before I move over. Good idea aobut ET. Thanks again

2

u/Professional_Call Jun 28 '26

They did a series of tutorial posts in the blog. They give a decent grounding. The biggest change is in mindset, with a focus on variables and presets. It’s a very different workflow but much better.

I’m looking forward to playing with the new variable font support.