Creative workflow

Reserve Image Space Before It Loads to Prevent Layout Shift

Layered stone forms leave a broad open span in a warm ivory composition.

The schedule below a fictional Rowan Studio hero image jumps when the image arrives. The hero crop and file are right. The page was simply missing space for it before load. We compared two otherwise matching pages and measured the same line of schedule text before and after the image arrived.

Quick answer

Give the browser the image's correct width and height or reserve its intended aspect ratio in the layout. Keep it responsive with a width limit and automatic height. Check the next element's position before and after image load at each relevant breakpoint.

1. Reproduce the jump under controlled conditions

Use the same image URL and CSS on both pages. In the teaching sample, use Load fictional hero image to release the image only after you can see the starting state. In a real page, use a cold cache or network throttling so the before state lasts long enough to inspect.

2. Reserve the ratio from the image or layout contract

The sample SVG is 480 × 300. Setting width and height to those dimensions tells the browser the 8:5 aspect ratio before the file arrives. CSS sets the available width and lets height scale automatically. If a breakpoint uses a different crop, reserve that crop's ratio in the matching layout.

3. Measure the line that shifts

Measure the top of the same paragraph before loading and again after decoding the image. Compare the change in CSS pixels, and repeat at a narrow width. This controlled displacement demonstrates the mechanism. To measure the site's actual CLS, use a layout-shift trace and consider other causes, including fonts, ad slots and late banners.

Start with the reference proof

The Ciyo board shows the reference on the left and an empty place for the comparison.
The Ciyo board shows the reference on the left and an empty place for the comparison.

Review the two proofs in Ciyo

Import the two rendered files on a Ciyo canvas and place the comparison beside the reference at the same scale. Keep each as its own movable item so a reviewer can compare them. Run the file or browser checks in the environment specified above.

In the sample, the schedule line moves in the unreserved page and stays at the same position in the reserved page at both tested widths. Without reservation the measured displacement was 300 CSS pixels at 680 pixels wide and 177 at 320 pixels wide. With reservation, it stayed at zero at both widths.

In the sample, the schedule line moves in the unreserved page and stays at the same position in the reserved page at both tested widths. Without reservation the measured displacement was 300 CSS pixels at 680 pixels wide and 177 at 320 pixels wide. With reservation, it stayed at zero at both widths.
Production Ciyo canvas, December 4, 2026. Fictional assets were placed and aligned by hand.

Examples and source files

Reference and related reading

Frequently asked questions

Do I still need dimensions for a lazy-loaded image?

Yes, image loading can still cause movement when space has not been allocated. Reserve the destination ratio before the image enters view.

Is the measured shift in pixels the CLS score?

No. CLS uses a viewport-based calculation and excludes certain recent interactions. The test shows what moved, then a proper performance trace can quantify real CLS.

Review one export on the canvas

Place your two proofs side by side and record the specific change that passes your check.