Back to blog
shopify performance speed-optimization core-web-vitals seo conversion-optimization cloudflare

Shopify Store Speed Optimization: Complete Guide to Sub-2-Second Load Times

Proven techniques to speed up your Shopify store. From image optimization to CDN setup, learn how to achieve sub-2-second load times and improve Core Web Vitals.

2 min read

I recently optimized a Shopify store from 4.2 seconds to 1.8 seconds load time. Conversion rate increased by 18%, and the client estimated an extra $120k in annual revenue. Here’s exactly what I did, and how you can do it too.

Why Speed Matters (With Real Numbers)

Every 100ms delay in page load costs you approximately 1% in conversions. For a store doing $50k/month:

  • 500ms slower = $2,500/month lost
  • 1 second slower = $5,000/month lost
  • 2 seconds slower = $10,000/month lost

Google also uses Core Web Vitals as a ranking factor. Slow stores rank lower, get less organic traffic, and pay more for ads (Google Ads quality score drops for slow landing pages).

Target benchmarks:

  • LCP (Largest Contentful Paint): Under 2.5 seconds (good), under 1.8 seconds (great)
  • FID (First Input Delay): Under 100ms
  • CLS (Cumulative Layout Shift): Under 0.1

Step 1: Measure Your Current Performance

Before optimizing, benchmark where you are. Use these free tools:

Google PageSpeed Insights

PageSpeed Insights shows Core Web Vitals from real users and lab data. Test:

  • Homepage
  • A collection page
  • A product page
  • Cart page

Note your LCP, FID, and CLS scores. These are your baselines.

GTmetrix

GTmetrix provides waterfall charts showing exactly what’s loading and when. Look for:

  • Large images (anything over 500KB)
  • Slow third-party scripts
  • Render-blocking resources
  • Total page weight (aim for under 3MB)

Shopify’s Built-in Report

In Shopify admin: Online Store → Themes → Actions → View Speed Report

This compares your store to similar Shopify stores. Aim for “faster than similar stores.”

Step 2: Image Optimization (Biggest Win)

Images are typically 60-80% of page weight. Optimizing them gives the biggest speed improvements.

Use Shopify’s Native Image Optimization

Shopify automatically converts images to WebP and serves appropriate sizes. But you need to use the right Liquid syntax:

{{ product.featured_image | image_url: width: 600 | image_tag: loading: 'lazy' }}

Key points:

  • Always specify width (Shopify generates responsive sizes automatically)
  • Use loading: 'lazy' for below-the-fold images
  • Don’t use loading: 'lazy' for hero images (hurts LCP)

Optimal Image Sizes

Image TypeRecommended WidthFormat
Hero banner1600px maxWebP (auto)
Product images800pxWebP (auto)
Collection thumbnails400pxWebP (auto)
Logo300pxSVG preferred

Compress Before Upload

Even with Shopify’s optimization, start with properly sized images:

  1. Use Squoosh (free) to compress images before upload
  2. Target 80% quality for JPEG—visually identical, 30-50% smaller
  3. Remove EXIF data (adds unnecessary bytes)

Before/After Example:

  • Original product photo: 2.4MB, 4000x4000px
  • After optimization: 180KB, 800x800px
  • Result: 92% smaller, no visible quality loss

Step 3: Reduce Third-Party App Bloat

Apps are the #1 cause of slow Shopify stores. Each app can add 50-500ms to load time.

Audit Your Apps

  1. Go to Online Store → Themes → Actions → Edit Code
  2. Open layout/theme.liquid
  3. Count the <script> tags from apps

Each app script is a potential performance hit. I’ve seen stores with 15+ app scripts adding 3+ seconds to load time.

The App Cleanup Process

  1. List all installed apps and their purpose
  2. Check which actually load on the frontend (some are admin-only)
  3. Uninstall apps you’re not using
  4. Consider alternatives for slow apps

Common culprits:

  • Chat widgets (often add 200-500ms)
  • Social proof popups
  • Countdown timers
  • Multiple analytics tools
  • Unused review apps

Use Shopify’s Native Features Instead

Shopify has added many features that used to require apps:

  • Product reviews → Use Shopify Reviews (free) or a lightweight option like Judge.me
  • Currency conversion → Shopify Payments multi-currency
  • SEO → Built into Shopify
  • Social sharing → Simple share links (no app needed)

Step 4: Theme Optimization

Choose a Fast Theme

Theme choice matters significantly. The fastest Shopify themes:

  1. Dawn (Free) - Shopify’s reference theme, extremely fast
  2. Impulse by Archetype - Archetype Themes - Premium, optimized
  3. Turbo by Out of the Sandbox - OOTS - Known for speed

If you’re on an older theme (Debut, Brooklyn, etc.), consider migrating to Dawn or a modern premium theme. The performance difference can be 1-2 seconds.

Liquid Optimization

If you’re comfortable with code, these Liquid optimizations help:

1. Whitespace stripping:

{%- if product.available -%}
  <button>Add to Cart</button>
{%- endif -%}

The - characters remove unnecessary whitespace from the HTML output. Can reduce page size by 5-10%.

2. Limit collection loops:

{% for product in collection.products limit: 12 %}
  <!-- product card -->
{% endfor %}

Never loop through unlimited products. Always use limit.

3. Lazy load sections: Use loading: 'lazy' for images in sections below the fold.

Step 5: Set Up a CDN (Cloudflare)

Cloudflare is free and dramatically improves global performance.

Why Cloudflare Helps

Shopify’s servers are fast, but CDN adds:

  • Caching: Static assets served from edge locations worldwide
  • Compression: Automatic Brotli/gzip compression
  • Security: DDoS protection, bot blocking
  • SSL: Free SSL certificate

Setup Process

  1. Sign up at Cloudflare (free tier)
  2. Add your domain and follow DNS setup
  3. Configure caching rules:
    • Cache Level: Standard
    • Browser Cache TTL: 4 hours
    • Always Online: On
  4. Enable optimizations:
    • Auto Minify: JS, CSS, HTML
    • Brotli: On
    • Early Hints: On

Expected improvement: 200-500ms faster load times, especially for international visitors.

Cloudflare Pro ($20/month) - Worth It?

If you’re doing $10k+/month, Cloudflare Pro adds:

  • Polish: Automatic image optimization
  • Mirage: Lazy loading for mobile
  • Better caching rules
  • Faster response times

The $20/month typically pays for itself in improved conversion rates.

Step 6: Font Optimization

Custom fonts can add 200-500ms to load time if not optimized.

Use System Fonts When Possible

System fonts load instantly:

font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

If Using Custom Fonts

  1. Limit font weights: Load only what you use (e.g., 400 and 700, not 100-900)
  2. Use font-display: swap: Shows fallback font while custom font loads
  3. Self-host Google Fonts: Faster than loading from Google’s CDN
  4. Preload critical fonts:
<link rel="preload" href="/fonts/your-font.woff2" as="font" type="font/woff2" crossorigin>

Step 7: Critical Rendering Path

Defer Non-Critical JavaScript

JavaScript that isn’t needed for initial render should be deferred:

<script src="non-critical.js" defer></script>

Or load asynchronously:

<script src="analytics.js" async></script>

Inline Critical CSS

CSS needed for above-the-fold content should be inlined in <head>. This eliminates render-blocking CSS requests.

Most premium themes handle this automatically. If yours doesn’t, consider migrating.

Real-World Optimization Case Study

Before Optimization

  • LCP: 4.2 seconds
  • Total Page Weight: 8.4MB
  • Requests: 127
  • Apps: 14 installed, 9 loading scripts
  • Theme: Older version of Brooklyn

Issues Identified

  1. Hero image: 3.2MB (not optimized)
  2. 9 app scripts loading on every page
  3. 6 custom fonts loading
  4. No CDN
  5. Large product images (800KB each)

Changes Made

  1. Images: Compressed and resized (saved 5MB)
  2. Apps: Removed 5 unused apps (saved 1.2 seconds)
  3. Fonts: Reduced to 2 weights (saved 300ms)
  4. CDN: Added Cloudflare (saved 400ms)
  5. Theme: Migrated to Dawn (saved 800ms)

After Optimization

  • LCP: 1.8 seconds (57% faster)
  • Total Page Weight: 1.9MB (77% smaller)
  • Requests: 43 (66% fewer)
  • Conversion Rate: +18%
  • Estimated Revenue Impact: +$120k/year

Quick Wins Checklist

If you only have 30 minutes, do these:

  • Compress your hero image using Squoosh (10 mins, biggest impact)
  • Uninstall unused apps (5 mins)
  • Set up Cloudflare free tier (15 mins)
  • Test with PageSpeed Insights (2 mins)

Tools I Use

What to Watch For

Don’t Over-Optimize

Some optimizations have trade-offs:

  • Aggressive lazy loading: Can hurt LCP if you lazy-load the hero image
  • Too much caching: Can show stale content (prices, inventory)
  • Removing too many apps: Some apps drive revenue—measure before removing

Test on Real Devices

Lab scores (PageSpeed Insights) don’t always match real-world performance. Test on:

  • A mid-range Android phone on 4G
  • iPhone on WiFi
  • Desktop Chrome

Monitor Continuously

Speed degrades over time as you add products, apps, and content. Check monthly:

  • PageSpeed Insights scores
  • Shopify speed report
  • Conversion rate trends

Bottom Line

Speed optimization isn’t a one-time project—it’s an ongoing practice. But the ROI is enormous: faster stores convert better, rank higher, and provide better customer experiences.

Start with the quick wins (image compression, app cleanup, Cloudflare), then tackle theme and code optimizations as needed.

My recommendation: If your store loads in over 3 seconds, you’re leaving significant money on the table. Spend a weekend on optimization—the revenue improvement will pay for your time many times over.


Want more Shopify performance tips? Check out our theme development guide for advanced optimization techniques.

Share this article