Lazy loading is the practice of holding back images, videos and other embedded content until a visitor scrolls close to them, instead of downloading everything the moment a page opens. A long page then starts sooner and uses less data, because nothing further down is fetched until somebody is about to see it.
In short
- Content further down the page loads only when it is needed.
- One attribute in the page code switches it on for images.
- It saves data for visitors who never reach the bottom.
- Applied to the first large image, it makes a page slower.
What it actually changes
Without it, a browser opening a page requests every image the page contains, from the logo in the header to the last photograph in the footer. On a page with thirty product photographs, all thirty are fetched before the visitor has read the first line, competing for the same connection as the text and the one image they are actually looking at.
With lazy loading, the browser fetches what is on screen and a little beyond it, then requests the rest as the visitor scrolls. The page becomes usable sooner, and somebody who reads the top half and leaves never downloads the bottom half at all.
That matters more than usual here. Many visitors browse on mobile data, often on prepaid load, and images they never see are data they paid for without reason. A shop page or a gallery that loads only what is looked at costs those visitors less and holds their attention longer.
How it is switched on
Modern browsers support it natively. Adding loading="lazy" to an image, or to
an embedded frame such as a map or a video player, is enough; no script is
needed, and every major browser honours the instruction.
Most platforms now do this without anybody asking. WordPress has added the attribute to images automatically since version 5.5, and later versions try to leave the first large image alone. Shopify themes and most page builders have similar settings. Older sites often rely on a script instead, which works but adds weight of its own and can fail when the script does.
The attribute covers images placed directly in the page and embedded frames. Pictures set as backgrounds in the stylesheet, which many themes use for large banners, are not covered by it, and need a different approach when they sit far down a long page.
Embedded videos and maps deserve the same treatment. A single embedded video player can weigh more than every image on the page, and loading the frame only when it comes into view, or showing a still image that loads the player when tapped, removes that cost for everybody who never presses play.
The image it must never touch
The mistake that turns lazy loading into a slowdown is applying it to the first image a visitor sees.
The large image at the top of a page is usually the element that Core Web Vitals times as Largest Contentful Paint, the moment the main content appears. A lazy image is only requested after the browser has worked out the layout and confirmed the image is on screen, which is later than it would otherwise start. Google’s own guidance is not to lazy load images above the fold.
The fix is to leave that first large image loading normally, and often to mark it as a priority so the browser fetches it before anything else. Everything below it can wait its turn.
A carousel opening a page raises the same question for every slide. The first slide should load normally, and the others can wait, since most visitors never swipe far enough to see them.
Layout shift, and giving images a size
Lazy images arrive while the visitor is already reading. If the page has not reserved space for them, the text jumps down as each one appears, which is irritating on a phone and is counted as layout shift in Core Web Vitals.
Giving every image a width and height in the code, or a fixed shape in the design, lets the browser hold the space open until the image arrives. The page then fills in quietly instead of moving under the reader’s thumb. A blurred preview or a plain block of colour in that space makes the wait feel shorter still.
Search engines and lazy content
Google renders pages much as a browser does, and it can see images that lazy load in the usual way, as they come into view. Problems arise when content only loads after a click, a tap or some other action a crawler does not perform. Products or text hidden behind a button that loads more with a script may never be seen by a search engine at all.
The safe rule is that anything you want found should load when it scrolls into view, without anybody having to press anything. Galleries and product grids that depend on a button are worth checking with the URL inspection tool in Search Console, which shows what Google actually rendered.
Words you will hear
- Native lazy loading. The browser’s own support, switched on by one attribute.
- Viewport. The part of the page visible on screen at any moment.
- LCP image. The large image Core Web Vitals times as the main content.
- Eager loading. Fetching an image straight away, which is the browser default.
- Fetch priority. A hint telling the browser which image to fetch first.
- Placeholder. A blurred preview or blank space shown until the image arrives.
Open your homepage on a phone using mobile data and watch the first large image. If it appears after the text below it, check whether that image has been set to lazy load.
Questions we get
More about lazy loading
What is lazy loading?
Does lazy loading help SEO?
Should every image be lazy loaded?
How do I switch it on?
Why does the text jump around while images load?
Does it work for embedded videos and maps?
Does lazy loading save my visitors data?
Do it yourself
Guides on the same topic
Free step by step guides for owners doing the work themselves. No sign up and no email required.
Related terms
Core Web Vitals
Core Web Vitals are three measurements Google takes of how a page behaves for real visitors: how fast it appears, how quickly it responds, how much it moves.
Above the fold
Above the fold is what a visitor sees before scrolling. On a phone that is a small space, and what you put in it decides whether the rest gets read.
Caching
Caching stores a ready-made copy of a page or file so it loads without being built again. It makes a site fast, and it hides your newest edit.