How lazy loading works

Without lazy loading, the browser downloads all the images as soon as the page opens, including those right at the bottom that the visitor may never scroll down to. With lazy loading, it first downloads only what is visible on screen. The other images load gradually, just before the visitor reaches them. The same works for YouTube videos, maps and other embedded elements.

Modern browsers support this natively, and WordPress switches on lazy loading for images automatically. For videos, maps and section backgrounds, however, it often has to be handled separately.

Why it matters

Images make up most of the size of an ordinary page. On a shop category with 48 products, or a long home page with a gallery, the difference in speed is large, especially on mobile with a slower connection. Fewer people leave a faster page, it scores better on Core Web Vitals and it uses less of the visitor's data.

A real-world example

A construction company's website had an embedded YouTube video, a map and a gallery of completed buildings on its home page. Everything loaded as soon as the page opened, even though these elements were at the very end of the page. After setting up lazy loading and showing the video only once the preview is clicked, the home page loaded noticeably faster.

Common mistakes

  • Lazy loading on the main image at the top of the page. The browser then loads it late and, paradoxically, the page gets slower. An image that is visible straight away should load immediately.
  • Missing image dimensions. When an image finishes loading, the page content jumps and the visitor clicks somewhere they did not intend to.
  • Two plugins doing the same thing. WordPress and an optimisation plugin can clash, and the images may not appear at all.

Tip

Lazy loading helps most when combined with resized images in WebP format. I set it up as part of speeding up a website. Correctly configured lazy loading improves Core Web Vitals, which I also monitor during SEO optimisation.