Websites and Tech

Lazy Loading

Also called lazy load, loading=lazy

A technique that delays loading images, videos and iframes until a visitor scrolls close to them, so the first screen loads sooner.

Quick facts: Lazy Loading

Category
Websites and Tech
Also called
lazy load, loading=lazy
Level
Intermediate
Affects
Largest Contentful Paint, Cumulative Layout Shift, data use on mobile, image indexing
Where to see it
PageSpeed Insights, Chrome DevTools Network panel, Lighthouse, Search Console URL Inspection
In this article4
  1. How lazy loading works
  2. Why it matters
  3. Common mistakes
  4. How to act on it

Lazy loading is a way of delaying images, videos and embedded content until a visitor scrolls close to them. The browser fetches what is needed for the first screen straight away and leaves the rest until it is about to come into view, so the page becomes usable sooner and uses less data.

How lazy loading works

Modern browsers support lazy loading natively. Adding loading="lazy" to an image or iframe tag tells the browser it may wait. The browser then judges, from scroll position and connection speed, when to start the download, usually a little before the element reaches the screen so the visitor does not see a gap.

Before native support, sites used JavaScript: the real image address sat in a data attribute, and a script copied it into place when the visitor scrolled. Many older themes and plugins still work this way. It does the job for visitors, but if the script fails or waits for a scroll event, search engines may never see the image at all.

WordPress has added loading="lazy" to images automatically since version 5.5, and later versions try to leave the first large image on the page out of it. Shopify themes, page builders and image plugins have their own settings, which do not always agree with each other.

Why it matters

Speed shapes how many visitors stay. On a long service page or a category page with forty product photos, loading everything at once means the visitor’s phone downloads images they may never scroll to, while the text at the top waits its turn. Lazy loading puts those bytes where they are needed first, which helps people on patchy mobile signal on a train as much as anyone.

It also feeds into Core Web Vitals, but in both directions. Lazy loading images further down helps the page settle sooner. Lazy loading the main image at the top does the opposite: the browser deliberately delays the very element that usually decides Largest Contentful Paint, and the score gets worse. It is one of the most common reasons I see for a slow LCP on otherwise lean pages.

Common mistakes

  • Lazy loading the hero image, logo or first product photo, all of which sit above the fold.
  • Images without width and height attributes, so content jumps as they arrive and Cumulative Layout Shift rises.
  • JavaScript lazy loading that only reacts to scrolling. Google renders pages with a tall viewport rather than scrolling, so images that wait for a scroll may not be found.
  • Two systems lazy loading the same images, such as WordPress plus a speed plugin plus the theme, causing flicker or images that never appear.
  • Lazy loading background images set in CSS with a script that search engines cannot follow, when the image matters for image search.

How to act on it

Run a key page through PageSpeed Insights and look at which element it names as the LCP element. If that image carries loading="lazy", remove the attribute for that image and consider fetchpriority="high". Then open the page in Chrome, open the Network panel filtered to images, reload and scroll slowly: offscreen images should arrive as you approach them, and nothing on the first screen should wait.

Finally, check a page with URL Inspection in Search Console and view the rendered HTML to confirm image addresses appear in normal src attributes. Sorting out loading order, image formats and layout shift across templates is part of my technical SEO work.

Do and do not

Do

  • Use the browser's native loading="lazy" attribute for images below the fold
  • Load the main hero image straight away, with fetchpriority="high" where it helps
  • Give every image a width and height so space is reserved

Do not

  • Lazy load the largest image on the first screen
  • Rely on scroll-triggered scripts that hide image URLs from crawlers
  • Stack a plugin's lazy loading on top of the CMS's own

Questions people ask about this

Does lazy loading hurt SEO?

Native lazy loading on images below the first screen does not. Problems come from lazy loading the main image, which slows Largest Contentful Paint, and from script-based methods that hide image addresses until a visitor scrolls. Check the rendered HTML in Search Console to be sure Google can see your images.

Should I lazy load every image on the page?

No. Leave out anything visible on the first screen without scrolling, especially the largest image, the logo and the first product photo. Those should load immediately. Everything further down is a good candidate.

Can I lazy load YouTube videos and maps?

Yes, and it often helps more than images, because embedded players and maps pull in a lot of script. Add loading="lazy" to the iframe, or show a still image that swaps to the player when clicked. Bear in mind that embedded YouTube and Google Maps can set cookies, so check how your cookie banner handles them.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.