Shopify Image Performance: srcset, Lazy Loading, and When to Ditch the Gallery App
Published on 2026-03-22
On mobile, the Largest Contentful Paint is often your hero or main product image. If that asset is a 4000px JPEG served full width on a 390px screen, you are paying for pixels nobody sees.
Then merchants install a zoom / gallery app that ships its own JavaScript bundle, defers the real image, or replaces Shopify's responsive markup. Suddenly you have beautiful zoom — and a red PageSpeed score.
What Shopify Gives You for Free
Shopify's CDN and the image_url filter (and image_tag in modern themes) support width and format parameters. Dawn and other OS 2.0 themes use srcset so the browser downloads an appropriate size.
That means:
- Do not upload 5MB PNGs for simple product shots. Compress before upload; use WebP or AVIF where the pipeline allows.
- Trust the theme's lazy loading for below-the-fold images instead of a global "lazy load" app that wraps every
<img>in observers. - Reserve apps for true differentiators (360 spin, AR) — not for "slightly nicer thumbnails."
Theme Settings vs. Code
Many performance wins are checkboxes: fixed aspect ratios for cards, limiting featured image sizes on the homepage, turning off autoplay video heroes. Audit Theme settings before you open the code editor.
The Gallery App Problem
Gallery apps often:
- Inject extra DOM and CSS that loads on every product page.
- Replace Liquid-rendered markup with client-side rendering (bad for LCP).
- Duplicate alt text or strip it — hurting accessibility and SEO.
If you only need swipeable thumbnails, Dawn's product media or a small Liquid tweak is usually enough.
Quick Audit Checklist
- Run PageSpeed Insights on a best-selling product URL (mobile).
- Identify the LCP element — is it your main image?
- In DevTools Network, check image file dimensions vs. display size.
- Remove or disable one gallery app and re-test.
Bottom line: Optimize assets at the source, use native responsive images, and keep product media logic in Liquid whenever you can. Speed is a feature — and it converts.