Core Web Vitals

How to Fix Largest Contentful Paint (LCP) on Shopify Mobile Stores

Pass Google Core Web Vitals LCP audit on Shopify. Learn image preloading, fetchpriority optimization, and hero rendering strategies for sub-2s loads.

Target Asset / Metric
hero images / product galleries
Average Uncompressed Payload
N/A (Render Timing Metric)
Main Thread Latency Penalty
Target: Under 2.5s (Current Industry Avg: 4.8s)

1. The Technical Problem

Largest Contentful Paint measures when the largest visual element (usually the hero banner or primary product image) becomes visible to the shopper.

Hero images are often lazy loaded by mistake, hidden behind carousel JavaScript sliders, or served in oversized uncompressed formats without responsive srcset.

Is this slowing down your Shopify store right now?

Test your live store URL in our non-invasive telemetry scanner. Zero software install required.

2. Engineering Resolution Strategy

1. NEVER lazy load the above-the-fold hero image (`loading='eager'`). 2. Add `` in document ``. 3. Output WebP/AVIF formats with exact responsive sizing.

<!-- Preload Hero Image in theme.liquid <head> -->
{% if template.name == 'product' %}
  <link rel="preload" as="image" href="{{ product.featured_image | image_url: width: 800 }}" fetchpriority="high">
{% elsif template.name == 'index' %}
  <link rel="preload" as="image" href="{{ hero_image | image_url: width: 1200 }}" fetchpriority="high">
{% endif %}

<!-- Eager Hero Image in Liquid -->
{{ product.featured_image | image_url: width: 800 | image_tag: 
  loading: 'eager', 
  fetchpriority: 'high', 
  widths: '375, 550, 750, 1100', 
  alt: product.title 
}}

💡 Pro-Tip: Always create a duplicate theme backup before editing theme.liquid or snippet files.

Frequently Asked Questions

Why should I not lazy load my hero banner?
Lazy loading instructs the browser to wait until layout is calculated before downloading the image, adding 800ms-1500ms of unnecessary delay to LCP.
What is a good LCP score for Shopify?
Google requires an LCP of under 2.5 seconds on mobile 4G to pass Core Web Vitals.

Need this executed with a 100% money-back guarantee?

Our turnkey 48-Hour Speed Sprint resolves render-blocking scripts, fixes Core Web Vitals, and guarantees a 90+ mobile Lighthouse score.