How to Add Lazy Loading to Images on Shopify & WooCommerce
errorThe Problem
Your page loads ALL images immediately — even ones far below the fold that users can't see yet. This wastes bandwidth, slows down initial page load, and hurts your Largest Contentful Paint (LCP) score.
trending_upWhy It Matters for SEO
A typical product page might have 10-20 images (product photos, related products, trust badges). Loading all of them upfront means the browser is doing 10-20x more work than needed on initial load. Lazy loading defers below-fold images until the user scrolls near them, which can improve LCP by 20-30%.
buildHow to Fix It
- 1
Modern Shopify themes (Dawn, etc.) include lazy loading by default. Check if your theme already uses loading='lazy'.
- 2
Go to Online Store → Themes → Edit Code.
- 3
Search for `<img` tags in your template files.
- 4
Add loading='lazy' to ALL images EXCEPT the first visible one (hero image, main product photo).
- 5
The first visible image (above the fold) should NOT be lazy loaded — that would actually slow it down.
<!-- Hero image: DO NOT lazy load (it's above the fold) -->
<img src="{{ product.featured_image | img_url: '800x' }}" alt="{{ product.featured_image.alt }}" width="{{ product.featured_image.width }}" height="{{ product.featured_image.height }}">
<!-- Below-fold images: ADD lazy loading -->
<img src="{{ image | img_url: '400x' }}" alt="{{ image.alt }}" width="{{ image.width }}" height="{{ image.height }}" loading="lazy">
<!-- Using image_tag filter (recommended) -->
{{ image | image_url: width: 400 | image_tag: loading: "lazy" }}Related Fix Guides
How to Fix Slow Page Speed on Shopify & WooCommerce
Your store is too slow. Learn the fastest fixes for Shopify and WooCommerce page speed — image optimization, app audits, caching, and more.
How to Fix Missing Image Dimensions on Shopify & WooCommerce
Fix missing width and height attributes on images. Without them, your page layout shifts as images load — hurting your CLS score and rankings.
Want to check if YOUR store has this issue?
Scan your site for free — get copy-paste fixes in 60 seconds.
searchScan Now — It's Free