Speed work in Shopify is often framed as “run Lighthouse and fix what’s red.” That helps, but it misses the point.
The right approach is a repeatable playbook that improves real customer experience and protects revenue over time.

Start with the metrics that matter
Focus on Core Web Vitals first:
- LCP: how fast primary content appears.
- INP: how responsive interactions feel.
- CLS: how stable layout remains while loading.
These map directly to product-page UX and checkout intent.
Step 1: Baseline before touching code
Capture a baseline for:
- Homepage.
- Top collection page.
- Top product page.
- Cart page.
Record current LCP, INP, CLS and total JS payload. Save this snapshot so you can prove improvement.
Step 2: Fix image delivery in Liquid
Large unoptimized images are usually the first bottleneck.
Use Shopify image helpers with responsive widths and explicit loading strategy:
{{
section.settings.hero_image
| image_url: width: 1920
| image_tag:
widths: '640, 960, 1280, 1600, 1920',
sizes: '100vw',
loading: 'eager',
fetchpriority: 'high',
alt: section.settings.hero_alt
}}Code language: Django (django)
For below-the-fold media, switch to loading: 'lazy'.
Step 3: Split scripts by template
Do not load every script everywhere.
<script src="{{ 'theme.js' | asset_url }}" defer></script>
{% if request.page_type == 'product' %}
<script src="{{ 'product-page.js' | asset_url }}" defer></script>
{% endif %}
{% if request.page_type == 'collection' %}
<script src="{{ 'collection-filters.js' | asset_url }}" defer></script>
{% endif %}Code language: Django (django)
Template-based loading reduces JS parse/execute cost and improves responsiveness.
Step 4: Audit third-party apps and trackers
Many Shopify speed problems come from third-party injections, not core theme code.
For each external script, ask:
- Does it still serve a business goal?
- Can it be delayed until interaction?
- Can it load only on specific templates?
- Is there overlap with another tool?
Removing one unnecessary app script can outperform a week of micro-optimizations.
Step 5: Stabilize layout to reduce CLS
CLS often comes from missing dimensions and dynamic UI shifts.
Fixes include:
- Set explicit width/height for images/media.
- Reserve space for announcement bars and async widgets.
- Avoid injecting banners above existing content after paint.
Step 6: Optimize font loading
Fonts can delay text rendering and inflate LCP.
Use:
- Fewer font families/weights.
- font-display: swap.
- Preload only critical font files used above the fold.
Step 7: Build a post-launch monitoring rhythm
Performance is not a one-time sprint. It regresses quietly as apps and campaigns change.
Create a monthly check that tracks:
- Vitals trend by page type.
- JS size trend.
- New third-party scripts.
- Largest content element changes.
Quick wins checklist
- Convert oversized PNG/JPEG assets where possible.
- Defer non-critical scripts.
- Load page-specific JS only where needed.
- Remove dead apps and duplicate trackers.
- Add dimensions to all key images and embeds.
Conclusion
A fast Shopify theme is not about hacks. It is about disciplined defaults in Liquid, intentional script loading, and controlling third-party code.
Stores that do this consistently get faster pages, cleaner UX, and better conversion resilience as they scale.
Leave a Comment