Wordpress images oversized

Hi,
I’m not new to Blocs but this is the first time I’m trying to create a Wordpress theme.
My issue is that the images within the body of the post (within the content; not the featured image) are shown full size, that is, they don’t respect the width of the theme for the content.

I’m guessing this is due to some settings on Wordpress, and could be very similar to this, but I don’t know which setting I must tweak for images to be restricted to 8 columns.

Help would be appreciated.

Thank you

Do you have a link where we can see the actual issue on a live site?

Thanks, when I look at the source, it seems Jetpack is forcing a style upon the image that makes it display full size:

img[Attributes Style] {
width: 2400px;
aspect-ratio: auto 2400 / 1600;
height: 1600px;

This is in link 1.

In link 2 a totally different style setting is applied:

img[Attributes Style] {
width: 1024px;
aspect-ratio: auto 1024 / 683;
height: 683px;

This seems to be the reason for your issue. It seems linked to the lazy loading function in Jetpack.

Thank you very much for your help! Will try to fix it.

1 Like

Okay so this is what I believe I found out:

  • Photos are oversized because they were uploaded before the Wordpress blocks editing system [last entry on that blog is from three years ago].

  • Once you convert old posts into Wordpress blocks system —setting Size to large is not enough, won’t do anything—, there are some options regarding the images [image size: thumbnail, medium, large, full size] and selecting either of them will make the image to constrain to the width set in Blocs (the app). This seems to be also true for 25, 50, 75 and 100% options within Image dimensions section.

So I don’t think it’s related to Jetpack, because enabling or disabling the plugin doesn’t change anything. And Site 2 is brand new and never had Jetpack installed, so I’d say that the style is not set by Jetpack.

Now, the aspect ratio of the pictures is still wrong. Will keep looking into it.