Free auditStart free
GuideShopify · Performance

Shopify lazy loading

How Shopify's image_tag sets loading=lazy, how to keep the first-screen and LCP image eager, and how to check your theme for lazy-loaded hero images.

3 min
read
3
sources
Oct 29, 2026
updated
Scaplet Editorial Team
author
In one line

Shopify's image_tag filter sets loading to lazy automatically for images in sections further down the page, unless you apply preload. Shopify says not to lazy load images above the fold, and its performance guide says never to lazy-load the LCP image. Check your hero and first product image for loading=lazy.

30-second check

Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode
01Check it

What image_tag does by default

Shopify's Liquid reference for image_tag says that if you don't apply the preload attribute, then loading is automatically set to lazy for images in sections further down the page. It also adds width and height based on the image dimensions, and generates a srcset by default. A sizes attribute appears only when you pass sizes.

That is Shopify's documented pattern for custom attributes. The same docs say "You shouldn't lazy load images above the fold" and suggest writing your own logic if the default doesn't work for your theme.

Override an attribute by passing a parameter with its name
{{ product | image_url: width: 200 | image_tag: class: 'custom-class', loading: 'lazy' }}
03Check it

Preload and what it changes

Shopify's image_tag docs say that when preload is set to true, a resource hint is sent as a Link HTTP header with a rel value of preload. Because the automatic lazy default applies only when you don't apply preload, a preloaded image isn't switched to lazy by that rule. Use it for the one image you know is the LCP candidate, not for a gallery.

Check this against your theme: the preload parameter is documented on the image_tag page, but how a given theme's sections pass it is theme-specific.

Preload the LCP image
{{ section.settings.hero | image_url: width: 1600 | image_tag: preload: true }}
04Explained

Why the LCP caveat is real

web.dev analyzed browser-level image lazy loading on WordPress sites. WordPress's implementation lazy-loaded images above the fold, and in a lab test that delayed LCP on archive pages. An experimental fix that lazy loaded only images below the fold reversed the regression, with image bytes unchanged from the default. web.dev's explanation: not loading below-the-fold images means less network contention with the LCP image. The test used WordPress, not Shopify, so treat it as the reason behind Shopify's advice, not as a measurement of your store.
05How it works

Check it worked

  1. 1

    Find the first-screen images

    Open the home page, a collection page and a product page, and note which images are visible before scrolling.

  2. 2

    Inspect their markup

    In DevTools, Elements panel, select each one and look at its loading attribute. Any first-screen image with loading="lazy" should be eager.

  3. 3

    Fix in the section file

    Pass loading: 'eager' for the first image in the section, keep the default for later ones, and re-inspect after saving.

Questions

Asked a lot.

2 questions people ask next, answered from the sources on this page.

01Does Shopify lazy load images by default?

With image_tag, loading is set to lazy automatically for images in sections further down the page, unless you apply preload.

02Should I lazy load the hero image on Shopify?

No. Shopify's docs say not to lazy load images above the fold, and its performance guide says to never lazy-load the LCP image and to mark it with fetchpriority high.

Sources · 3

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • shopify.dev
  • web.dev
  1. 01image_tag | Shopify Liquid referenceshopify.dev · checked 2026-11-01
  2. 02Theme performance best practices | Shopify developer docsshopify.dev · checked 2026-11-01
  3. 03The performance effects of too much lazy loading | web.devweb.dev · checked 2026-11-01
Free · 2 minutes

Tools point. Agencies advise. This one ships.

Run the free audit, then approve the fixes. Every change can be undone.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane