Images without width/height: fix layout shift
Images without width and height cause layout shift (CLS) that hurts Core Web Vitals. Find images missing dimensions and fix them, free.
What it means
An image without explicit width and height causes the browser to reserve no space until the image loads, so the layout shifts once the pixels arrive. This is a Core Web Vitals issue—specifically it inflates Cumulative Layout Shift (CLS).
Why it matters
CLS is one of the three Core Web Vitals that Google uses in its ranking signals. Images that shift after load also make it harder for crawlers and AI agents to parse the page structure, since the visual and semantic layout don't match until rendering completes.
How to fix it
- Add explicit width and height attributes to every <img> tag (e.g., width="800" height="600").
- For responsive images, use <picture> or srcset and keep the width/height on the <img> element.
- Avoid CSS-only sizing (width/height via stylesheet only) unless you can prove the dimensions are resolved before paint.
- Check lazy-loaded images—they still need width and height even when loading="lazy".
Example
<img src="/hero.jpg"><img src="/hero.jpg" width="1200" height="630">Explicit width/height (or a CSS aspect-ratio) lets the browser reserve space before the image loads, preventing layout shift (CLS).
When it's not a problem
It's fine if the image is part of a hero or full-viewport element where shift is acceptable, or if the image loads so quickly that the shift never registers in a meaningful way. Also acceptable when the image is decorative and has aria-hidden="true".
How Crawlinx detects it
We check <img> tags for width and height attributes. Images missing them can cause layout shift as they load, so we flag them — a Core Web Vitals (CLS) concern.
How common is it?
11833 audited sites in our corpus currently show this issue. The breakdowns below show which platforms, gatekeepers, verticals and countries are most exposed.
FAQ
- Why do images need width and height?
- So the browser can reserve the right space before the image downloads. Without them the page reflows on load — a jump that hurts your Cumulative Layout Shift score.
Related guides
Audit your own site — free
157 checks, internal PageRank, render-diff. No signup, results in ~30s.