Skip to content
Nazmul Nikhil
Menu

Image Elements Do Not Have Explicit Width and Height (PageSpeed Insights)

Images without width and height make the page jump as they load. Here's the simple fix, how it works with responsive images, and where to add it.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 1 min read
Image Elements Do Not Have Explicit Width and Height (PageSpeed Insights)
Photo: Nathan Dumlao on Unsplash

In short

PageSpeed flags images without width and height attributes (or a CSS size). The browser doesn't know how much space to reserve, so content jumps when the image loads, which adds to CLS. Add the image's real pixel width and height as attributes; CSS can still make it responsive.

This check lives on as its own diagnostic in Lighthouse 13.

The fix

<img src="/uploads/team.webp" width="1200" height="800" alt="Our team">
img { max-width: 100%; height: auto; }

The browser uses the width and height to work out the aspect ratio, so the image scales and the space is still reserved.

WordPress: core adds dimensions to images in content; flags usually come from theme templates, logos or page-builder widgets. Shopify: use the theme's image tag helpers, which output dimensions. Webflow: set sizes on images, especially in Collection lists. Wix: usually handled. Custom builds: store dimensions at upload and output them.

This guide isn't affiliated with or endorsed by Google.

Sources and references

TAGSPageSpeed InsightsImage elements do not have explicit width and heightUnsized imagesImage width height attributes
Nazmul Nikhil

About the author

Nazmul Nikhil

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.

Need help with this?

Get it fixed with Core Web Vitals

I find the issues that cost you traffic and fix them, starting with the pages that matter most.

Keep reading

Related articles

All Page Speed & Core Web Vitals posts →

Get the next guide in your inbox

One email when a new SEO or AI search guide goes live.

Ready to grow?

Get a free audit of your website, or book a 30-minute call to talk through your goals.

Nazmul Hasan

Talk to Nazmul directly

Reply within 24h

WhatsApp +880 1682835118
nazmulnikhil@gmail.com