The oldest fix in web performance, still not applied
An image without width and height is a hole in the layout. The browser has no idea how
much room to leave, so it leaves none, paints the text — and then shoves everything down
when the file finally lands. Reserving that space is one attribute pair, it has worked in
every browser for decades, and it costs nothing at runtime.
So the question isn’t whether people know. It’s how often the markup that actually reaches a browser carries it. Across 162 audited sites, 86 of them — 53% — ship at least one image the browser cannot size in advance. Between them we had to measure and correct 1,010 individual images: a median of 10 on each affected site, and 24 on the worst.
The score that should catch it, doesn’t
Here is the part we did not expect. Of those 86 sites, 82 — 95% — score “good” on Cumulative Layout Shift, at or under the 0.10 threshold. 26 of them score exactly zero. Across the whole base, a third of the sites report a mobile CLS of precisely 0.
Not because the images are sized. Because of how the measurement works.
A lab run like Lighthouse (the engine behind PageSpeed Insights) loads the page once, in a simulated browser, at a fixed viewport — and then stops. It doesn’t scroll. It doesn’t click. A shift only counts if it happens while the tool is watching, and most of these images are below the fold, so the shift they cause happens on a scroll that never occurs.
This isn’t our reading of it — Google documents the gap directly: lab CLS “only considers layout shifts that occur above the fold and during load”, while the field metric “considers all unexpected layout shifts that occur throughout the lifespan of the page, including content that shifts as the user scrolls”. Our numbers just say how often that gap has something real hiding in it.
The defect is real and sitting in the markup. The number people check to find it is looking the other way.
It tracks the platform, not the team
Split the same 162 sites by what built them and the pattern is not about diligence:
| Platform | Sites shipping unsized images | Images we fixed |
|---|---|---|
| Duda | 41 of 48 — 85% | 452 |
| Bitrix | 3 of 4 — 75% | 56 |
| Shopify | 3 of 6 — 50% | 48 |
| WordPress | 23 of 48 — 48% | 275 |
| Tilda | 0 of 6 — 0% | 0 |
| Next.js | 0 of 6 — 0% | 0 |
The two platforms with a perfect record are the two that build the image tag for you and refuse to emit one without dimensions. The ones at the top hand that job to a theme, a widget or a content editor — and it gets dropped, over and over, on sites that are otherwise professionally maintained.
Treat the small counts with care: six Tilda sites and six Next.js sites are not proof of a guarantee, only an absence of counter-examples in this base. The Duda and WordPress rows, at 48 sites each, are the two we would defend.
What to do with this
If you own a site, the useful conclusion is not “add width and height” — you already knew
that. It’s that a green CLS score is not evidence you did. Check the markup, not the
metric: open any page, look at a handful of <img> tags below the first screen, and see
whether they carry dimensions or a CSS aspect-ratio.
If they don’t, the fix is per-image and permanent, and the official advice is one line:
always include width and height on images and
video, or reserve the space with CSS aspect-ratio. Where it gets awkward is when the markup isn’t yours to change — a builder’s
template, a theme, a plugin’s gallery widget. That is the case we built WebSpeed for: it
reads each image’s real dimensions from the file header and writes the ratio into the page
as it’s served, so the browser reserves the right box without anyone guessing a 1/1 and
squashing a portrait crop.
Either way, the check is the same and it takes a minute: look at what your pages actually ship, rather than at the score that failed to mention it.
Method and limits
Every completed WebSpeed audit that has both a stored copy of the original HTML and a mobile Lighthouse run — 162 sites. For each one we count the images our proxy had to give an aspect-ratio to, meaning the markup carried neither width/height nor a CSS ratio, and compare that against the site's own measured Cumulative Layout Shift.
Measured on 21 Jul 2026 across 162 sites. These figures are frozen at that date — we don't quietly restate a published study when the audit base grows.
What this doesn't show
- This is not a random sample of the web. These are sites we chose to audit — performance vendors, publishers, one batch of small-business Duda sites — so read every figure as "of the sites we audited", never as "of the web".
- The image count is a floor, not a total. We only count images whose real dimensions we could read from the file header; anything we could not fetch is left alone and therefore uncounted.
- Lighthouse CLS is a lab figure from a single simulated load that never scrolls and never clicks. That is the point of the study, but it also means the "good" scores here are not evidence the sites are stable for real visitors — only that the test didn't catch them.
Sources
- Cumulative Layout Shift (CLS) — web.dev, Google
Sites should strive to have a CLS score of 0.1 or less. To ensure you're hitting this target for most of your users, a good threshold to measure is the 75th percentile of page loads, segmented across mobile and desktop devices.
- Why lab and field data can be different (and what to do about it) — web.dev, Google
CLS measured in the lab only considers layout shifts that occur above the fold and during load, but this is only a subset of what CLS actually measures. In the field, CLS considers all unexpected layout shifts that occur throughout the lifespan of the page, including content that shifts as the user scrolls.
- Optimize Cumulative Layout Shift — web.dev, Google
Always include width and height size attributes on your images and video elements. Alternatively, reserve the required space with CSS aspect-ratio or similar.