𝗭𝗲𝗿𝗼 𝗖𝗟𝗦 𝗜𝗺𝗮𝗴𝗲𝘀 𝗶𝗻 𝗡𝗲𝘅𝘁.𝗷𝘀 𝟭𝟲

You scroll a page. An image loads. The text jumps. This is a bad user experience. It is called Cumulative Layout Shift (CLS).

There are two separate image problems:

Fix layout shift by reserving space. The browser needs the image size before the file arrives.

Use these patterns:

This stops the page from jumping.

Fix the abrupt pop-in with a Low-Quality Image Placeholder (LQIP). This is a tiny base64 image.

For remote images, Next.js does not do this for you.

Only enable the blur if the data exists. This prevents errors.

Use the sizes prop. It tells the browser the right image size for the screen. It saves bandwidth.

Use preload for the main hero image. This helps the page load faster. Do not preload every image.

Test your site on slow 4G.

Reserve space for stability. Use LQIP for a better feel.

Source: https://dev.to/markyu/zero-cls-images-in-nextjs-16-lqip-blur-up-done-right-1nkb