Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

How to fix “Image elements do not have explicit width and height” error

Home / Forums / Kadence Theme / How to fix “Image elements do not have explicit width and height” error

This topic is: Resolved
[Resolved]
Posted in: Kadence Theme
May 25, 2024 at 1:34 am

Hi! Any help would be amazing, as I am pulling my hair out. I’m using the free Kadence theme with the “Kadence Blocks – Gutenberg Blocks for Page Builder Features” plugin added as well.

When I test my pagespeed with Google’s PageSpeed Insights tool, I get this error:
“Image elements do not have explicit width and height”

Sometimes the error is red, and sometimes it is yellow.

I have tried many things to fix this issue, with no luck:
– Scaling the images down in the wordpress media settings.
– Setting the dimensions in the post editor block
– Adjusting the aspect ratio in the post editor block
– Changing the image’s HTML code to add dimensions (which always errors out the image and I have to resolve the html to restore the image)

I’m totally lost as to how to fix this, and I’m hoping someone else has already figured this out?

Thank you so much!!
Jessica

  • The forum ‘Kadence Theme’ is closed to new topics and replies.