Performance Guide · March 2026

Lazy Loading vs Eager Loading on Shopify: When to Use Each

One defers resources until they're needed. The other downloads everything immediately. Get the balance wrong and your store gets slower, not faster. Here's the definitive guide to choosing between lazy and eager loading for every element on your Shopify store.

~10 min read · 2,600 words · Updated March 2026

Quick Comparison: Lazy Loading vs Eager Loading

Before diving deep, here's the fundamental difference. Both strategies control when the browser downloads a resource — but their goals are opposite.

⏳ Eager Loading

Downloads the resource immediately when the browser reads the HTML.

  • Default browser behavior (no attribute needed)
  • Best for above-the-fold content
  • Ensures fastest render of critical elements
  • Uses more bandwidth on initial load

💤 Lazy Loading

Defers downloading until the user scrolls near the element.

  • Requires loading="lazy" attribute
  • Best for below-the-fold content
  • Reduces initial page weight by 40–70%
  • Slight delay when scrolling to deferred content

The ideal Shopify store uses both — eager loading for the content visitors see first, lazy loading for everything they'll scroll to later. The challenge is knowing where to draw the line, especially when "above the fold" differs across devices. Test your store's speed to see how your current loading strategy performs.

How Each Loading Strategy Works Under the Hood

Eager Loading: The Default Path

Eager loading is what browsers do by default. When the HTML parser encounters an <img> tag without a loading attribute, it immediately queues the image for download:

Browser reads HTML → Finds <img src="product.jpg">

Immediately queues download → Image loads as bandwidth allows

This is fast and predictable for above-fold images. The downside? If you have 40 images on a collection page, the browser tries to download all 40 simultaneously. Your hero image — the one that determines your LCP score — has to share bandwidth with 39 other images the visitor hasn't scrolled to.

Lazy Loading: Deferred Until Needed

When you add loading="lazy" to an image, the browser registers it but doesn't download it until the IntersectionObserver detects the image is approaching the viewport:

Browser reads HTML → Finds <img loading="lazy">

Registers but skips download → User scrolls... scrolls... →

Image approaches viewport → IntersectionObserver triggers → Download begins

This extra step is exactly why lazy loading your LCP image is so costly — you're adding an unnecessary wait for your most important visual element. But for images below the fold, this deferral is pure benefit: less bandwidth competition and faster initial render.

When to Use Eager Loading on Shopify

Eager load any element that appears in the initial viewport — what the visitor sees before scrolling. On Shopify, this typically means:

Hero banners and slideshow images — These are almost always the LCP element. Eager load with fetchpriority="high".

Featured product images — The main product photo on product pages. This is the LCP candidate on product templates.

Navigation and logo — Small files that visitors expect to see immediately. Lazy loading them causes visible pop-in.

First row of collection products — The products visible without scrolling on your collection pages.

Above-fold trust badges and icons — Small but visually important for initial impression.

Shopify's rule of thumb: Use section.index <= 2 for eager loading. The first two sections on any page are almost always above the fold on both desktop and mobile. It's better to eager load a few extra images than to accidentally lazy load something above the fold — as noted by Shopify's performance team.

When to Use Lazy Loading on Shopify

Lazy load anything the visitor won't see until they scroll. On most Shopify stores, that's the majority of images:

Product grids beyond the first row — Collection pages with 20+ products should only eager load the first 4–8 products visible above the fold.

Testimonial and review images — Customer photos, avatar images, star rating graphics below the fold.

Blog post images — Except the featured image, all inline images should lazy load.

Footer content — Payment icons, social media logos, newsletter section images — nobody sees these on initial load.

YouTube/Vimeo embeds — Video iframes are heavy. Lazy loading them via loading="lazy" on the iframe prevents downloading megabytes of video player code until the visitor scrolls to the video.

Product gallery thumbnails — On product pages, thumbnail images below the main photo can be lazy loaded since the visitor interacts with one at a time.

For more detail on what to lazy load and the technical implementation, see our full Shopify lazy loading guide.

Skip the Guesswork: Thunder Applies the Right Strategy Automatically

Thunder Page Speed Optimizer analyzes each page template, identifies the LCP element, and applies the optimal loading strategy per element — eager for above-fold, lazy for below-fold, with intelligent adaptation for different devices. No Liquid editing, no guessing about fold lines.

  • Auto-detects LCP — ensures your hero image always eager-loads
  • Defers app scripts — the part that lazy loading images can't help with
  • Works with any theme — Dawn, Prestige, custom — all handled
  • 27+ point average improvement in speed score

See plans or start with a free trial.

Install Thunder — Free Trial →

Loading Strategy by Shopify Page Type

Different page templates have different LCP elements and content structures. Here's the optimal loading strategy for each:

🏠 Homepage

Eager load: Hero banner/slideshow, featured collection (first row), announcement bar images, logo

Lazy load: Second featured collection and beyond, testimonials, Instagram feed, blog post previews, footer images

LCP element: Usually the hero banner image

📦 Product Page

Eager load: Main product image, product title area, price display

Lazy load: Gallery thumbnails, related products, review section images, "you may also like" carousel

LCP element: Usually the main product image

📂 Collection Page

Eager load: Collection banner image, first 4–8 product images (first 1–2 rows), filter UI icons

Lazy load: All product images beyond the first visible rows, pagination, subcollection images

LCP element: Usually the collection banner or first product image

📝 Blog Post

Eager load: Featured/hero image, author avatar

Lazy load: All inline content images, related post thumbnails, sidebar images

LCP element: Usually the featured image or first heading text block

How to Implement Both Loading Strategies in Shopify Liquid

Here's the practical Liquid code for implementing the right loading strategy across your theme. This follows Shopify's native lazy loading best practices.

Basic: Section-Index Based Loading

{%- liquid
if section.index > 2
assign loading = "lazy"
else
assign loading = "eager"
endif
-%}

{{ section.settings.image | image_url: width: 1200 | image_tag: loading: loading }}

Advanced: LCP Image With fetchpriority

{%- if section.index == 1 -%}
{%- comment -%} Hero section — LCP image, maximum priority {%- endcomment -%}
{{ section.settings.image | image_url: width: 1400 | image_tag: loading: "eager", fetchpriority: "high", decoding: "sync" }}
{%- elsif section.index == 2 -%}
{%- comment -%} Second section — eager but normal priority {%- endcomment -%}
{{ section.settings.image | image_url: width: 1200 | image_tag: loading: "eager" }}
{%- else -%}
{%- comment -%} Below fold — lazy load {%- endcomment -%}
{{ section.settings.image | image_url: width: 1200 | image_tag: loading: "lazy" }}
{%- endif -%}

Product Grid: First Row Eager, Rest Lazy

{%- for product in collection.products -%}
{%- if forloop.index <= 4 and section.index <= 2 -%}
{%- assign img_loading = "eager" -%}
{%- else -%}
{%- assign img_loading = "lazy" -%}
{%- endif -%}

{{ product.featured_image | image_url: width: 600 | image_tag: loading: img_loading, alt: product.title }}
{%- endfor -%}

Don't forget: Always include width and height attributes on lazy-loaded images (or set them via CSS) to prevent Cumulative Layout Shift (CLS). The image_tag filter handles this automatically.

fetchpriority: The Third Loading Strategy You Should Know

Beyond lazy and eager, there's a third lever: fetchpriority. This attribute doesn't control when a resource loads but how important it is relative to other resources:

fetchpriority="high" — Download this before other images. Use on your LCP image only.

fetchpriority="low" — Download this after more important resources. Good for decorative images above the fold that don't affect LCP.

fetchpriority="auto" — Let the browser decide (default). Fine for most images.

The combination of loading="eager" + fetchpriority="high" on your LCP image is the most aggressive loading strategy available. It tells the browser: "Download this immediately, and prioritize it over everything else." For LCP optimization, this combination typically shaves 100–300ms off your LCP time.

Browser support: fetchpriority is supported in Chrome 101+, Edge 101+, and Safari 17.2+. Firefox doesn't support it yet but treats it as a no-op, so it's safe to use everywhere. For a deeper dive into all performance metrics, check our Core Web Vitals guide.

Frequently Asked Questions

Should I lazy load or eager load my Shopify hero image?

Always eager load your hero image. The hero image is almost always the Largest Contentful Paint (LCP) element, and lazy loading it adds an unnecessary delay of 200-1000ms. Either omit the loading attribute entirely (the browser defaults to eager) or explicitly set loading='eager' plus fetchpriority='high' to ensure it loads as fast as possible.

What's the performance difference between lazy and eager loading?

On a typical Shopify store with 30+ images, lazy loading below-fold images reduces initial page weight by 40-70%, directly improving Time to Interactive and LCP. However, lazy loading above-fold images has the opposite effect — Shopify's performance team measured a 1.0 second median LCP penalty for stores that lazy load their LCP image. The key is using eager loading for the first 2-3 sections and lazy loading for everything below.

Does eager loading everything make my Shopify store faster?

No. Eager loading everything means the browser downloads all 20-50+ images simultaneously on page load. This creates bandwidth competition where your hero image — the one visitors actually see first — has to share bandwidth with images far below the fold that nobody has scrolled to yet. The result is a slower first contentful paint and worse LCP scores.

Can I mix lazy and eager loading on the same Shopify page?

Absolutely — that's the recommended approach. Use eager loading for above-the-fold content (hero images, featured products, navigation icons) and lazy loading for below-the-fold content (product grids, footer images, testimonial photos). Shopify's section.index property makes this straightforward: eager load sections 1-2, lazy load section 3 and beyond.

What is fetchpriority and should I use it with eager loading?

fetchpriority='high' is an HTML attribute that tells the browser to prioritize downloading a specific resource over others. Combined with eager loading, it ensures your LCP image loads before other eager-loaded resources like secondary images or fonts. Use it only on 1-2 images per page — typically your hero image and primary product photo. Overusing it defeats the purpose.

How does Thunder Page Speed Optimizer handle lazy vs eager loading?

Thunder automatically identifies your LCP element on every page template and ensures it's eager-loaded with high priority, while lazy loading all below-fold content. It adapts this logic per device type (mobile vs desktop have different fold lines) and per page template (homepage, product, collection pages all have different LCP elements). No manual configuration needed.

The Right Loading Strategy Makes a Real Difference

Lazy loading vs eager loading isn't a binary choice — it's about applying the right strategy to the right element. Eager load your LCP image with high priority, eager load the rest of the above-fold content, and lazy load everything below the fold. That's the formula that gets you the fastest possible initial render without wasting bandwidth.

But remember: image loading strategy is only part of the equation. Third-party scripts from apps often cause more performance damage than unoptimized images. A holistic approach — handling images, scripts, CSS, and fonts together — delivers the best results.

Next step: Run your free speed test to see how your current loading strategy impacts performance, then explore our complete Shopify speed optimization guide for the full picture.

Do It Yourself

Free plan · 1-click install · Instant results

Install Thunder Free →

Done For You

Core Web Vitals guarantee · 2-week delivery · 6 months Thunder free

Get Expert Optimization →

Starting from €1,500