Never lazy-load the LCP image
- What it says
loading="lazy"on the LCP image delays it until after layout completes; always load images visible in the initial viewport eagerly
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.
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.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
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.
{{ product | image_url: width: 200 | image_tag: class: 'custom-class', loading: 'lazy' }}loading="lazy" on the LCP image delays it until after layout completes; always load images visible in the initial viewport eagerlyfetchpriority="high"image_url and image_tagwidth and heightimage_tag adds them automatically{{ section.settings.hero | image_url: width: 1600 | image_tag: loading: 'eager', fetchpriority: 'high', sizes: '100vw' }}This line is an illustration, not a Shopify example. It applies Shopify's documented rule that a parameter named like the attribute sets it, applied to the two attributes the performance guide recommends. Adjust the width and sizes to your layout, and check the rendered HTML rather than trusting the Liquid.
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.
{{ section.settings.hero | image_url: width: 1600 | image_tag: preload: true }}Open the home page, a collection page and a product page, and note which images are visible before scrolling.
In DevTools, Elements panel, select each one and look at its loading attribute. Any first-screen image with loading="lazy" should be eager.
Pass loading: 'eager' for the first image in the section, keep the default for later ones, and re-inspect after saving.
2 questions people ask next, answered from the sources on this page.
With image_tag, loading is set to lazy automatically for images in sections further down the page, unless you apply preload.
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.
Run the free audit, then approve the fixes. Every change can be undone.