• After updating to 6.0.3 post featured image block does not output object-fit: cover, thus causing the images to stretch on the front end.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @deothemes. What theme are you using? The Post Featured Image block has never had object-fit: cover in the default block styles and so I think what might be happening here is that a theme added object-fit: cover and that maybe this has stopped working.

    Thread Starter DeoThemes

    (@deothemes)

    It’s official Twenty Twenty Two with no plugins. If you enter height it will show the Scale settings – https://clip2net.com/s/4gU18T6

    Thanks for the extra context!

    I did some testing. I set up Twenty Twenty-two and edited my theme to contain a Featured Image block with a Height and a Scale set to “Cover”. I then looked at the frontend in WordPress 5.9.5, 6.0.3, and 6.1 RC 2. What I saw is that object-fit is erroneously not output in WP 5.9 and WP 6.0 but does appear in WP 6.1.

    In other words I think this is a bug that was introduced in WP 5.9 but fixed in WP 6.1.

    This doesn’t quite align up with what you’re saying though which is that this worked for you in WP 5.9. The only thing I can think of is that maybe you had the Gutenberg plugin activated but it is now disabled? When I run WP 6.0 and install the Gutenberg plugin I see that the bug goes away.

    In any case, I think the solution for you is to install the Gutenberg plugin, upgrade to WP 6.1 RC 2, or wait for WP 6.1 to be released in a few weeks.

    Thread Starter DeoThemes

    (@deothemes)

    Let me clarify, I was on the version 6.0.2, everything was working normally. After updating to 6.0.3 the object fit property disappeared as inline style. So for now I downgraded to 6.0.2 and everything is back to normal. So the bug is obviously in the version 6.0.3

    I have also problem with scale of featured images just after upgrade to 6.0.3. Images are shrunk to the width and height on cover scale. Settings were untouched for weeks. Scale settings are visible as normal, but cover setting is not working: it shrinks images instead of cropping them. Theme twenty twenty-two, FSE, no Gutenberg plugin. Images are on front page, so I saw previous days to 6.0.3 update to work ok.

    Thanks for the extra info. I can confirm that object-fit: cover appears correctly in 5.9.4 and 6.0.2 but is erroneously missing in 5.9.5 and 6.0.3. I’ve raised this issue with the relevant Core team.

    Here’s the ticket for this bug: https://core.trac.www.ads-software.com/ticket/56855. It should be fixed in WP 6.1 RC 3. Thanks again for the report.

    I’ve created a mini-plugin for site owners to use prior to the next WordPress release.

    https://gist.github.com/peterwilsoncc/74ae0167e3a5d01502e7b1f94536a0fb

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Stretched post featured images after 6.0.3’ is closed to new replies.