Skip to main content
All SEO checks
Performancewarning

Images missing width and height

What this check looks for

Checks for <img> elements that lack explicit width and height attributes (or an equivalent aspect-ratio in CSS).

Why it matters

When an image has no declared dimensions, the browser doesn't know how much space to reserve, so content jumps as images load, hurting your Cumulative Layout Shift (CLS) Core Web Vital. Setting width and height lets the browser reserve the correct box before the image arrives, keeping the layout stable. Modern browsers use those attributes to compute an aspect ratio even when the image is CSS-scaled to be responsive.

How to fix it

html
<!-- Set the image's intrinsic pixel dimensions; CSS can still scale it responsively -->
<img src="/hero.jpg" width="1200" height="630" alt="Report dashboard" style="max-width:100%;height:auto;">

Go deeper

Check your site for this and 120+ other issues

Analyze any URL free