Skip to main content
Shopify guide

LCP (Largest Contentful Paint) for Shopify Stores

By ยท Updated ยท 7 min read

How LCP Behaves Differently on Shopify

Shopify's hosted infrastructure removes server-side control that developers take for granted on custom stacks. You cannot edit Nginx configs, adjust CDN cache headers directly, or deploy edge workers natively. This means the LCP optimization toolkit is narrower than on platforms like custom Next.js or Magento deployments โ€” but the constraints are predictable, which makes them solvable.

On most Shopify storefronts, the LCP element is the hero image on the homepage, the product featured image on PDPs, or a large banner inside a section. Liquid-rendered themes load these images through Shopify's CDN (cdn.shopify.com), which is globally distributed but does not support HTTP/3 on all edge nodes. The practical result: image delivery is fast but not always optimal, and render-blocking resources in the theme HEAD still delay when the browser starts painting that element.

Common LCP Culprits Specific to Shopify Themes

Theme architecture is the biggest LCP lever in Shopify. Online Store 2.0 themes (Dawn and its derivatives) use section-based rendering, which inlines critical CSS and defers non-critical stylesheets โ€” a structural advantage over older Sectioned themes or fully custom legacy themes. However, many merchants apply third-party theme customizations that re-introduce render-blocking CSS or load full icon font libraries (Font Awesome, for example) synchronously in the HEAD.

The Shopify app ecosystem is a systematic LCP risk. Each installed app that injects a script tag into the storefront adds to the critical-path resource chain. Shopify's Script Editor and the newer App Blocks in OS 2.0 let merchants place app code via theme editor sections rather than global script tags, but many older apps still use ScriptTag API injections that load on every page regardless of relevance. A store with 15โ€“25 apps commonly carries 400โ€“900 KB of JavaScript that the browser must at minimum discover before it can prioritize the LCP image.

Liquid template rendering itself does not block LCP directly โ€” Shopify's servers return HTML fast. The problem is what that HTML contains: large inline SVGs, unoptimized image src attributes without width/height declarations, and missing fetchpriority='high' on the hero image. Without explicit prioritization, the browser treats the LCP image as a normal resource and deprioritizes it behind render-blocking scripts.

Shopify's Built-In Tools for LCP Improvement

Shopify automatically serves images in WebP format when the browser supports it, and its CDN resizes images via URL parameters (e.g., _1200x.webp). The image_url Liquid filter with a size parameter generates correctly sized srcset attributes, reducing the byte weight of LCP images significantly. Themes built on Dawn use this filter by default; custom or heavily modified themes frequently bypass it and reference original uploaded image URLs, which can be 4โ€“8 MB files serving as LCP elements.

Shopify's native lazy loading attribute (loading='lazy') is applied automatically in Dawn to below-the-fold images. The critical fix is ensuring the LCP image explicitly carries loading='eager' and fetchpriority='high'. In Liquid, this means editing the section or snippet that renders the hero image and adding these attributes conditionally for the first image in the viewport. Shopify's theme editor does not expose these attributes as merchant-facing settings, so the change requires direct theme code editing or a theme developer.

Shopify Speed Score (powered by Google Lighthouse in a lab environment) gives a directional LCP signal inside the Shopify Admin dashboard. It does not reflect real-user LCP from Chrome User Experience Report (CrUX) data, which is what Google's Search Console and Core Web Vitals report use. Merchants should treat the Shopify Speed Score as a quick regression check, not as the definitive LCP measurement.

App Ecosystem Impact and How to Audit It

The fastest way to isolate app-caused LCP degradation on Shopify is to load the storefront in Chrome DevTools with the Network tab filtered to JS, then compare a session with apps disabled (using a password-protected duplicate theme with app scripts removed) versus the live theme. The delta in Time to First Byte and render-blocking resource duration isolates app overhead precisely.

Apps that reliably contribute to LCP delay on Shopify include live chat widgets, review platforms that load full JavaScript bundles on page load, loyalty programs with inline widgets, and certain upsell apps that inject pop-up logic into the critical path. The fix is not always uninstalling these apps โ€” many support async loading or have newer App Block versions that defer initialization. Contacting the app developer to request a deferred or async script version is a concrete, actionable step before removal.

Shopify's App Bridge and Storefront API allow headless implementations where the front end is decoupled from Shopify's Liquid rendering. Headless Shopify (using frameworks like Hydrogen or third-party headless stacks) gives full control over resource loading, preloading strategies, and CDN configuration โ€” effectively removing most of the platform-specific LCP constraints. The trade-off is significantly higher development and maintenance cost, which makes headless appropriate only for stores at scale where conversion rate improvements from sub-2s LCP justify the investment.

Step-by-Step LCP Fixes for Shopify Store Owners

First, identify the current LCP element using PageSpeed Insights (pagespeed.web.dev) on both the homepage and top-traffic PDP. The tool labels the LCP element directly. For most Shopify stores it is the hero banner image or the first product image. Second, open the theme code (Online Store โ†’ Themes โ†’ Edit code) and locate the Liquid snippet rendering that image. Add fetchpriority='high' and loading='eager' to the img tag, and confirm the image_url filter generates a srcset with appropriately sized variants (typically 800w, 1200w, 1600w).

Third, add a preload link tag in theme.liquid for the LCP image URL. On Shopify this is done by inserting a tag in the HEAD section: <link rel='preload' as='image' href='{{ section.settings.image | image_url: width: 1200 }}' fetchpriority='high'>. This signals the browser to fetch the image before the full HTML parse completes. Fourth, audit installed apps using Chrome DevTools Coverage tab to identify unused JavaScript. Deactivate apps not used on the specific page template (Shopify OS 2.0 allows app blocks scoped to specific templates). Fifth, verify results in PageSpeed Insights again, checking both the LCP timing and the 'Eliminate render-blocking resources' opportunity, which directly precedes LCP paint on most Shopify themes.

Frequently asked questions

What is a good LCP score for a Shopify store?

Google classifies LCP under 2.5 seconds as 'Good,' 2.5โ€“4 seconds as 'Needs Improvement,' and above 4 seconds as 'Poor.' These thresholds apply to Shopify stores exactly as they do to any other platform. Most unoptimized Shopify stores with several apps installed fall in the 3โ€“5 second range. Reaching sub-2.5s is achievable with theme code edits and app audit without going headless.

Does Shopify's CDN automatically improve LCP?

Shopify's CDN delivers images from geographically distributed edge nodes and automatically converts uploads to WebP for supported browsers, which reduces image byte size. However, CDN delivery alone does not fix LCP if the image lacks a preload hint, carries no fetchpriority attribute, or is blocked from painting by render-blocking scripts. CDN is a floor, not a ceiling โ€” additional theme-level changes are required to reach Good LCP scores.

Do third-party Shopify apps hurt LCP?

Yes, directly. Apps that inject JavaScript via the ScriptTag API load on every page, extending the browser's critical-path resource chain before it can prioritize the LCP image. A store with many active apps regularly shows 30โ€“70% of total page weight as app-originated JavaScript. Scoping apps to specific templates using OS 2.0 App Blocks and requesting async-loading versions from developers are the two most effective mitigations short of uninstalling.

Is Shopify's Speed Score the same as LCP?

No. Shopify's Speed Score is a Lighthouse-based lab metric measured in a simulated environment. LCP as reported in Google Search Console comes from real-user data collected in Chrome (CrUX). Lab scores and field scores differ because real users have varied devices, connection speeds, and geographic locations. Use PageSpeed Insights to see both lab and field data, and treat Shopify's native Speed Score only as a regression-detection tool.

Does switching to a headless Shopify setup fix LCP?

Headless Shopify removes platform-level rendering constraints and gives full control over preloading, code splitting, and CDN configuration, which can produce sub-1.5s LCP. However, headless requires significant ongoing engineering investment. For stores below seven figures in annual revenue, optimizing the existing Liquid theme โ€” fixing image attributes, auditing apps, and adding preload hints โ€” typically produces sufficient LCP improvement at a fraction of the cost.

MG
Written by

Matt is the founder of RunOctopus. He built All Angles Creatures from zero to page-1 rankings in reptile feeder insects in under 60 days using exactly this method โ€” turning a hard, entrenched niche into RunOctopus's proof store for programmatic SEO and AI search citation.

Connect on LinkedIn →

See what Otto would build for your store

Free architecture preview. No card required. Five minutes.

Generate Preview →