Web development

Lazy loading

Lazy loading is a technique that delays loading images, videos and other resources until they are about to appear on screen, so the initial page loads faster.

A long page might have 40 images, but a visitor sees only the first few at first. Lazy loading avoids downloading the rest until they are needed.

In more detail

Modern browsers support native lazy loading with the loading="lazy" attribute on images and iframes. JavaScript libraries offer more control for other content. The key rule is never to lazy-load the main image visible on first load, often the hero image, because that delays LCP. Images should also have width and height set to avoid layout shifts that hurt CLS. Lazy-loaded content must still be crawlable, so avoid techniques that need user interaction to load content.

Why it matters

Lazy loading saves bandwidth, speeds up initial loads and improves Core Web Vitals, particularly on mobile connections.

Example

A recipe blog lazy-loads every image, including the hero photo, and its LCP is poor. Removing lazy loading from the hero and keeping it for images further down improves LCP by 1.2 seconds.

FAQ

Lazy loading: quick answers

Should all images be lazy-loaded?

No. Images visible on first load, especially the main image, should load immediately.

Can Google see lazy-loaded content?

Yes, if it uses native lazy loading or loads when scrolled into view without needing clicks.

Free audit

Find out where you stand in search and AI answers.

Get a free audit of your SEO, AI visibility and email setup. We send a short, specific report with the three changes that would move the needle most.