Native loading="lazy" on img tags
The simplest and most reliable way to lazy-load Shopify product images the right way is the native HTML loading="lazy" attribute. No library, no script, no app — just one extra attribute on your <img> tags. The browser handles the rest: it defers fetching any image that isn’t within its calculated “distance-from-viewport” threshold (roughly 1,200px on Chrome at a fast connection) and loads it just before the user would scroll into view.
To implement it, go to Online Store ’ Themes ’ Actions ’ Edit Code. Open snippets/product-card.liquid, sections/main-product.liquid, and sections/featured-collection.liquid. Find every <img> tag that lacks loading="lazy" and add it. Crucially, also ensure each tag has explicit width and height attributes — without them, the browser cannot reserve space for the image and your CLS score suffers as images pop into layout.
Verify your implementation by opening Chrome DevTools Network tab, filtering by “Img”, and scrolling the page. Images should appear in the network waterfall only when you scroll near them — not all at page load. Most stores see a 20–40% reduction in initial page bytes transferred from this step alone. See our guide on Shopify page speed optimization for the full context.


























