Support » Fixing WordPress » WordPress image issue on v5.9.1

  • Hi there, Since WordPress latest update yesterday 22.2.2022 (v.5.9.1) I’ve noticed all of my sites which were using WordPress had a massive issue with images. ALL images looked ridiculously big. After further investigation, I discovered the issue and fixed it. WordPress support, could you please remove or fix that piece of code on your next update? The issue is found on: wp-includes/css/dist/block-library/style.min.css. The last piece of code has this:

    html :where(img){ height: auto; max-width: 100% }

    This caused img issue on ALL sites using that version of WordPress. Thanks.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Above css it general normalize css for images, that should not cause any issue unless you can some different CSS for all images that don’t respect the normalized css.

    Thread Starter seamlessdigital

    (@seamlessdigital)

    Well I don’t think WordPress itself should be interfering with normalising the css. So I had some images like this: <img src="whatever.jpg" height="50" alt="whatever" /> When WordPress was updated to v5.9.1, that height value was ignored and zoomed to original size. If I did this however: <img src="whatever.jpg" alt="whatever" style="height: 50px;" /> it worked fine as before.

    I just created an account to comment that this also broke an old website I made.

    Found this thread by searching this bit of code on google to find if the culprit.

    In my (I admit slightly unusual) case I was setting an image’s width to be 200% of it’s container. To fix this I had to override max-width and max-height back to unset.

    • This reply was modified 2 months, 3 weeks ago by see0also.
    • This reply was modified 2 months, 3 weeks ago by see0also.
    Thread Starter seamlessdigital

    (@seamlessdigital)

    @see0also Exactly my point. WordPress itself should not be interfering with css. WordPress support please remove that piece of code you’ve added on 5.9.1 on your next release (html :where(img){ height: auto; max-width: 100% }). If it remains, it will keep causing a mess especially on legacy sites and we cannot afford maintaining all of them for this. We might have to stop all auto-updates. Thanks.

    It broke a site based on Houzez theme. Very disappointing.

    The bug report is here. They fortunately already fixed it with a less broad selector.

    Thread Starter seamlessdigital

    (@seamlessdigital)

    @jlorenzetti I wish that was the case but after auto-updating sites to 5.9.2 issue still remains!! broke again tons of sites.. what a disaster. They don’t bother fixing a single piece of useless css code even after 5 bug reports. I’ll consider moving away from wordpress if this is NOT resolved with the next release!

    @wordpress support, as explained please remove this code html :where(img){ height: auto; max-width: 100% } from wp-includes/css/dist/block-library/style.min.css. THANKS.

    edited – as I see already been directed to Gutenberg issues

    • This reply was modified 2 months, 1 week ago by Alan Fuller.
    Thread Starter seamlessdigital

    (@seamlessdigital)

    @alanfuller Thanks! It’s been very frustrating day for me. I’ve added a patch on all of my wordpress sites but ofc this is not the best solution. Hopefully it will be fixed with the next wordpress release

    @seamlessdigital they moved it to 5.9.3, so the next update should hopefully fix it once for all 🤞

    I have had the opposite problem. Versions 5.9.1 and 5.9.2 shrank images on my pages. Therefore, !’ve stuck to 5.9 and cancelled auto updates for the time being. I hope 5.9.3 fixes this.

    It is annoying… If you don’t use Guttenberg install Classic Editor – it will remove this piece of code.

    @sagi76 Thanks for the advice, but I already use the Classic Editor plugin. I’ll just wait it out.

    Thread Starter seamlessdigital

    (@seamlessdigital)

    With the new v5.9.3 it seems to have been fixed. Shame it took them months to do this simple change

    Thank you for the alert. I’ve just installed v.5.9.3 and it does, indeed, fix my shrinking image problem. You have been a great help.

    • This reply was modified 1 month, 2 weeks ago by Mickey Bo.
Viewing 14 replies - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.