How to Fix Missing Lazy-Loading on Offscreen Images
Your pages load every image as soon as the HTML arrives, including images far below the fold that most visitors never scroll to. By the end of this guide, offscreen images will carry the native loading="lazy" attribute, your hero image will load eagerly with high priority, and the audit will pass on every page.

Why it matters
Images that start downloading on page load compete for bandwidth with the CSS, fonts and hero image the visitor needs first. That slows Largest Contentful Paint, wastes mobile data and adds server load. Native lazy-loading defers offscreen images until the user scrolls near them, so the first screen renders faster, which helps Core Web Vitals.
The impact is real but modest, and the fix takes minutes. The one trap is lazy-loading the hero image, which makes LCP worse.
What you need
Step-by-step fix
List the offscreen images missing lazy-loading
com/about in Chrome, press F12 and open the Console tab. Paste the snippet below. It lists every image that starts below the first screen and has no loading="lazy".
Run it on one page per template (home, article, product, category), because the fix usually lives in the template rather than on individual pages.
console.table([...document.images].filter(i => i.getBoundingClientRect().top + window.scrollY > window.innerHeight && i.getAttribute('loading') !== 'lazy').map(i => ({src: i.currentSrc || i.src, top: Math.round(i.getBoundingClientRect().top + window.scrollY)})));Identify the hero and above-the-fold images
Decide which images are visible without scrolling on both mobile and desktop. Typically that is the logo, the hero or banner image, and the first product or article image. These must not get loading="lazy".
Everything else below the first screen should: carousels past slide one, gallery thumbnails, footer badges, related-post thumbnails and testimonial avatars.
Add loading="lazy" to below-the-fold images
Add loading="lazy" to each offscreen <img> tag. While you are in the markup, also add explicit width and height. This lets the browser reserve space before the image loads, so deferred images do not cause layout shift (CLS).
decoding="async" is optional but harmless. Apply the same attribute to embedded YouTube or map <iframe> elements, which support it too.
<img src="/images/team-photo.jpg" alt="Example Co team at the 2025 offsite" width="800" height="533" loading="lazy" decoding="async"> <iframe src="https://www.youtube-nocookie.com/embed/VIDEO_ID" width="560" height="315" title="Product demo" loading="lazy"></iframe>
Load the hero image eagerly with high priority
Remove any loading="lazy" from the hero image and give it fetchpriority="high" instead. This tells the browser to fetch it ahead of other images. Use high priority on one image per page only.
Marking several images as high priority cancels out the benefit.
<img src="/images/hero.jpg" alt="Example Co spring collection" width="1600" height="900" fetchpriority="high" decoding="async">
Apply the change at the template level
Edit the shared components that output images: card loops, gallery blocks, related-posts widgets and footers. A common pattern is to make the first item in a loop eager and every later item lazy. This fixes every page that uses the template at once, which is how the audit scores you: by the share of pages that still have offscreen images without lazy-loading.
{% for product in collection.products %}
{% if forloop.index <= 2 %}
{{ product.featured_image | image_url: width: 600 | image_tag: loading: 'eager', width: 600, height: 600 }}
{% else %}
{{ product.featured_image | image_url: width: 600 | image_tag: loading: 'lazy', width: 600, height: 600 }}
{% endif %}
{% endfor %}Replace JavaScript lazy-load libraries with native loading
Older themes use libraries such as lazysizes or lozad. These put the real URL in data-src and a placeholder in src. Crawlers and audits may see only the placeholder, and the image is not marked with loading="lazy".
Move the real URL back into src, add loading="lazy", and remove the library script and its class names. All current browsers support native lazy-loading.
<!-- Before --> <img class="lazyload" src="placeholder.gif" data-src="/images/photo.jpg" alt="Workshop"> <!-- After --> <img src="/images/photo.jpg" alt="Workshop" width="800" height="533" loading="lazy" decoding="async">
Verify the result and re-run the audit
Clear any page cache, CDN cache or optimisation-plugin cache, then hard-reload the page. Run the console snippet from step 1 again; it should return an empty table. In DevTools Network > Img, reload the page: only above-the-fold images should load at first, and the rest should appear as you scroll.
Finally, re-run the audit to confirm the share of failing pages has dropped to zero.
Platform-specific notes
WordPress
Core adds loading="lazy" automatically to images inserted through the editor and to images output by wp_get_attachment_image(). Since WordPress 6.3 it skips the first content image and adds fetchpriority="high" to the likely LCP image. Failures usually come from hard-coded <img> tags in theme files, page-builder widgets, or images output by plugins. Fix those templates or turn on the builder's own lazy-load option (for example, Elementor > Settings > Features). Do not run two lazy-load plugins at once.
Shopify
Use the image_tag filter with loading: 'lazy' (or 'eager' for the hero). Edit via Online Store > Themes > ... > Edit code, typically in the sections/ and snippets/ folders. Dawn and most Online Store 2.0 themes already lazy-load sections below the first. Check custom sections and older vintage themes that write raw <img> tags.
Next.js
next/image lazy-loads by default, so offscreen <Image> components pass automatically. Add the priority prop to the hero image to disable lazy-loading and preload it. In Next.js 16 and later, priority is deprecated: use preload or fetchPriority="high" instead. Any plain <img> tags in your components still need loading="lazy" added manually.
Webflow
Select the image in the Designer and open Element settings (the gear icon). Set the Load option to Lazy for offscreen images and Eager for the hero. Images inside Rich Text and CMS collection lists follow the same setting on their bound image element.
Wix / Squarespace
Both platforms manage image loading themselves and lazy-load most gallery and section images by default. You cannot edit the <img> attribute directly. If the check fails, it is usually due to custom-code embeds or HTML blocks, where you can add loading="lazy" yourself.
Check that it worked
✅ How to verify
- Run the DevTools console snippet on each template; it returns no rows for offscreen images.
- DevTools Network tab filtered to Img shows below-the-fold images loading only after you scroll.
- Lighthouse shows no "Largest Contentful Paint image was lazily loaded" warning, and CLS has not increased.
- Re-run the audit and confirm no pages are listed as having offscreen images without lazy-loading.
⚠️ Common mistakes
- Adding loading="lazy" to the hero or logo image, which delays LCP and can noticeably hurt Core Web Vitals.
- Lazy-loading images without width and height (or a CSS aspect-ratio), causing layout shift as they load.
- Setting fetchpriority="high" on many images, which cancels the prioritisation.
- Keeping a JavaScript lazy-load library that leaves the real image URL only in data-src, hiding images from crawlers and image search.
Is this still an issue on your site? Run a free audit — ZORO checks this and 294 other SEO, AI-visibility, accessibility and security signals, with fixes for your platform.
Check my site freeFAQ
Does loading="lazy" hurt SEO or stop Google from indexing images?
No. Googlebot supports native lazy-loading and renders pages with a tall viewport, so images with loading="lazy" in their src are still discovered and indexed. The risk comes from JavaScript lazy-loaders that hide the real URL in data-src.
Should I lazy-load the hero image?
No. The hero is usually the Largest Contentful Paint element, and lazy-loading it delays its download. Load it eagerly (omit the attribute or use loading="eager") and add fetchpriority="high".
Do all browsers support native lazy-loading?
Yes. Chrome, Edge, Firefox and Safari all support loading="lazy" on images, and on iframes as well. Browsers that ignore the attribute simply load the image normally, so adding it is safe.
Can I lazy-load CSS background images with the loading attribute?
No. The loading attribute only works on <img> and <iframe> elements. For decorative backgrounds below the fold, either switch to an <img> with loading="lazy", or add the background class with an IntersectionObserver when the section nears the viewport.
How to Fix Too Many HTTP Requests on Your Web Pages
How to Fix Oversized Images and Cut Homepage Image Weight
How to Fix Unused JavaScript and Speed Up Mobile Pages
How to Fix Next-Gen Image Formats: Serve WebP and AVIF
How to Fix Third-Party Script Impact on Your Homepage
How to Fix Browser Caching Headers on Static Assets