Home / Fix guides / Speed and Core Web Vitals

How to fix "Defer offscreen images": lazy load the images people can't see yet

This warning means your page downloads images far down the page before the visitor has scrolled to them. The usual fix is to add loading="lazy" to images below the first screen, while leaving the main top-of-page image alone.

Offscreen images are pictures further down a page that a visitor cannot see when the page first opens. If the browser downloads every one of them straight away, the parts people actually look at have to compete for bandwidth. Lazy loading tells the browser to wait and fetch each image shortly before it scrolls into view.

What the problem is and what people see

Speed tools such as Lighthouse and PageSpeed Insights flag this with wording like "Defer offscreen images" next to a list of picture files and an estimated saving. The exact label depends on the tool version, but the idea is the same: images below the fold were loaded early.

Visitors rarely see an error. They notice a page that feels slow to settle, especially on a phone with a weak connection. Image-heavy pages such as galleries, long product lists, blog posts with many photos and portfolio pages are the usual culprits.

Why it matters

  • Speed on mobile: less data is downloaded up front, so the visible part of the page gets more of the connection. This can help Largest Contentful Paint, one of the Core Web Vitals.
  • Search: Google uses Core Web Vitals as part of its page experience signals. They are one factor among many, so do not expect a jump in rankings from this alone.
  • Sales and trust: slow pages lose impatient visitors, and a shop or booking page that drags feels less trustworthy.
  • Cost: visitors on mobile data download only what they scroll to, which is kinder to them and to your hosting bandwidth.

How to check if your site has it

All of these are free:

  1. Open PageSpeed Insights (pagespeed.web.dev), enter a page address and run the test. Look in the diagnostics or opportunities list for "Defer offscreen images" or a similar image item.
  2. In Chrome, open the page, press F12 and choose the Lighthouse tab. Run a mobile report and read the same list.
  3. In Chrome DevTools, open the Network tab, filter by Img, reload the page without scrolling and look at how many images were downloaded. If a long page has dozens of image requests before you scroll, lazy loading is probably missing.
  4. Right click the page, choose View page source and search for loading="lazy". If it appears on few or none of your lower images, they are loading eagerly.

Test more than the home page. Product, category and blog pages often behave differently because they use different templates.

How to fix it in general

Modern browsers support lazy loading natively, so you do not need a script for ordinary images. Add the attribute to each image tag below the first screen:

<img src="team.jpg" alt="Our team" width="800" height="600" loading="lazy">

Follow these rules:

  • Do not lazy load the main image at the top. The hero image, logo and anything visible without scrolling should load immediately. Lazy loading your largest visible image makes the page slower, not faster. For that image you can add fetchpriority="high" to say it matters most.
  • Always set `width` and `height` (or reserve the space with CSS). Without them the page can jump as lazy images appear, which hurts the Cumulative Layout Shift score.
  • Iframes can be lazy loaded too. Embedded maps and videos below the fold accept loading="lazy".
  • CSS background images are different. The attribute only works on img and iframe tags. A background set in CSS needs a different approach, such as switching that section to a normal image or asking your developer to load it when it nears the screen.
  • Do not forget size. Lazy loading a 4 MB photo is better than loading it early, but resizing and compressing it is better still.

Common platforms

Menu names change between versions and themes, so treat these as pointers rather than exact paths.

  • WordPress: recent versions add loading="lazy" to images automatically. If you still see the warning, a theme, page builder or optimisation plugin may be overriding it, or the images may be inserted in a way WordPress does not process. See the WordPress guide. WooCommerce shops follow the same rules, with extra attention to product grids.
  • Shopify: most current themes lazy load images below the fold, but older or heavily customised themes may not. The fix lives in the theme's image code, so see the Shopify guide.
  • Wix and Squarespace: both generally handle lazy loading for you. If the warning appears, the cause is often a large image in an element you cannot control, so check the image size first.
  • Webflow: the image settings panel usually has a loading option (lazy, eager or auto). Set images below the fold to lazy and the top image to eager.
  • Next.js: the built-in Image component lazy loads by default. The top image usually needs the option that marks it as high priority, and the name of that option can vary between versions, so check the current documentation.

How to confirm the fix worked

  1. Clear any site cache and your optimisation plugin's cache, so you are not testing an old version.
  2. Run PageSpeed Insights again on the same page and compare the image items and the Largest Contentful Paint time.
  3. Open the Network tab, reload without scrolling, then scroll slowly. Image requests should appear gradually as you move down the page.
  4. Scroll the page yourself on a phone. Images should appear as you reach them, with no blank gaps that stay blank and no sudden jumps.

Scores vary a little from test to test, so run the test two or three times before deciding.

How to stop it coming back

The problem returns when someone changes the theme, installs a new slider or gallery plugin, or pastes in a block of custom HTML. Lazy loading is easy to lose that way.

  • Recheck a few key pages after any theme, plugin or template change.
  • Ask whoever builds new pages to set width and height on images and to keep the top image eager.
  • Compress and resize images before uploading them.
  • Test again every few months.

SiteMonday covers this in its week 35 image optimisation pack, which flags offscreen images that load too early and lists them in a ranked fix list. It finds and explains the problem, and the change itself is made by you or your developer.

When to ask a developer

If your platform has no setting for it, or the images are CSS backgrounds, or a custom theme builds the image tags, a developer can usually fix it quickly. Give them the PageSpeed report and the list of affected pages.

Step by step for your platform

Questions

What does "defer offscreen images" mean?

It means images that are not visible when the page opens are still being downloaded straight away. Deferring them means they load only when the visitor scrolls close to them.

Should I lazy load every image on my site?

No. Images visible without scrolling, especially your main top image and logo, should load immediately. Lazy loading them can make the page feel slower.

Does lazy loading hurt SEO?

Native `loading="lazy"` is understood by modern browsers and Google, so it is safe when used on images below the fold. The risk comes from lazy loading the top image or from scripts that hide images from crawlers.

Why do I still get the warning after turning on lazy loading?

Common causes are a cached old page, a theme or plugin overriding the setting, images set as CSS backgrounds, or images that sit within the first screen on some devices. Clear caches and recheck the specific images listed in the report.

Do I need a plugin to lazy load images?

Usually not. Most modern platforms and WordPress itself do it by default, and for custom sites it is one attribute on the image tag.

Will lazy loading make my page jump around?

It can if images have no `width` and `height` set, because the browser does not know how much space to reserve. Setting dimensions on every image prevents this.

Related problems