Performance lab — the problem. The image below has no width or height, so everything under it moves when the image arrives.

An image with no reserved space

The image takes 1.2 seconds to arrive. Until it does, the browser does not know how tall it will be, so it gives it no space at all. Watch the text below it.

Lab test image, served after a 1200 ms delay

This heading will be pushed down

Imagine this is your "add to cart" button, or a link someone is about to tap. At the moment the image arrives, it jumps several hundred pixels down the page — and the tap lands on whatever took its place.

What to measure. DevTools → Performance, record a reload with network set to Slow 4G. Look at the Layout Shifts track, and at the Experience section. You can also open the Rendering panel and switch on "Layout Shift Regions" to see the moved area highlighted as it happens.

What you should see. A single large shift at the moment the image loads, and a non-zero CLS score for the page.

Then compare with the fixed version, which differs in exactly one way: the image carries its real width and height.