Image Optimization · April 2026

Shopify WebP & AVIF Images: Does Shopify Convert Automatically? (2026)

Shopify's CDN can serve images in WebP and AVIF — formats that are 25-50% smaller than JPEG. But automatic conversion doesn't always work. Here's when it does, when it doesn't, and how to fix the gaps.

~11 min read · 2,400 words · Published April 2026

Optimize Shopify Image Loading in 60 Seconds

Run a free speed test on your store — if images are dragging down your score, you'll see warnings like "Properly size images" or "Serve images in next-gen formats" in the diagnostics. While Shopify handles format conversion, Thunder Page Speed Optimizer tackles the other half of image performance:

  • Lazy loads offscreen images so they don't block initial page rendering
  • Preloads your hero/LCP image for faster above-the-fold rendering
  • Defers third-party app images and scripts that slow image loading
  • Optimizes resource loading order so images appear faster

Format conversion + loading optimization = maximum image speed. Thunder handles the loading side with one click.

How Shopify's WebP & AVIF Auto-Conversion Works

When someone visits your Shopify store, their browser sends an HTTP request with an Accept header listing the image formats it supports. A modern Chrome browser sends something like: image/avif,image/webp,image/apng,image/*. Shopify's CDN reads this header and serves the best format available.

The priority order is: AVIF → WebP → original format. If the browser supports AVIF and the AVIF version is smaller than the WebP version for that specific image, Shopify serves AVIF. Otherwise, it falls back to WebP. If the browser supports neither (extremely rare in 2026), it serves the original JPEG or PNG.

This happens at the CDN level — no theme code changes needed. Shopify announced automatic AVIF support in August 2022, building on WebP support that's been available since 2020. The conversion is done server-side, so it works for any image served through Shopify's image pipeline.

What Gets Auto-Converted

  • Product images — uploaded through Shopify admin
  • Collection images — featured images on collection pages
  • Theme assets — images in your theme's assets/ folder, served via asset_url
  • Content images — uploaded through the rich text editor in pages/blog posts
  • Section images — slideshow, hero banner, logo, and other theme section images

The key requirement: the image must be served through Shopify's CDN (URLs starting with cdn.shopify.com). Any image that goes through Shopify's image pipeline gets automatic format conversion.

When Shopify's Image Conversion Doesn't Work

Auto-conversion covers most images, but several common scenarios bypass Shopify's CDN entirely. If your speed test results still show "Serve images in next-gen formats," one of these is likely the cause:

1. Custom HTML with Hardcoded URLs

If your theme or a custom section uses a raw <img> tag with a full URL instead of Shopify's Liquid filters, the CDN can't intercept and convert the format. This is common in custom-coded sections and landing page builders.

Fix: Use Shopify's image_url filter or img_tag filter in Liquid templates. These route the image through Shopify's CDN pipeline.

2. CSS Background Images

Background images set via CSS background-image: url(...) don't go through Shopify's content negotiation process. CSS doesn't send Accept headers the same way <img> tags do, so the CDN serves the original format.

Fix: Replace CSS backgrounds with <img> tags using object-fit: cover for the same visual effect, but with CDN format conversion.

3. App-Injected Images

Many Shopify apps load their own images — review photos, trust badges, popup graphics, product recommendation thumbnails. These often come from the app's own CDN, not Shopify's, so they skip format conversion entirely. Review apps are the most common offender, loading dozens of user-uploaded photos in JPEG.

Fix: Contact the app developer, or use an app that serves images through Shopify's CDN. Thunder helps by deferring app-loaded images so they don't block rendering.

4. External and Metafield Images

Images stored in metafields and accessed without the image_url filter, or images hosted on external services (Cloudinary, Imgix, your own server), bypass Shopify's CDN entirely.

Fix: For metafield images, pipe through | image_url in your Liquid template. For external images, use the external service's own WebP/AVIF conversion.

WebP vs AVIF vs JPEG vs PNG: Shopify Image Format Comparison

Understanding the differences helps you make better decisions about source uploads and troubleshoot format issues. Here's how each format performs for typical Shopify product photography:

Format File Size (vs JPEG) Quality Browser Support Transparency Best For
JPEG Baseline Good 100% ❌ No Universal fallback
PNG 2-5× larger Lossless 100% ✅ Yes Logos, icons, transparency
WebP 25-35% smaller Excellent 97%+ ✅ Yes Most product photos
AVIF 30-50% smaller Best at low bitrate ~93% ✅ Yes High-compression hero images

For most Shopify stores, you don't need to choose. Upload high-quality JPEG or PNG source files, and Shopify's CDN picks the optimal format per visitor. The real performance gains come from proper sizing (don't upload 4000px images for 400px displays) and optimizing how images load — lazy loading, preloading, and responsive srcsets.

How to Check if Your Shopify Store Serves WebP & AVIF

Want to verify your images are being converted? Here's a quick check using Chrome DevTools:

  1. Open your store in Chrome and press F12 (or Cmd+Option+I on Mac) to open DevTools
  2. Click the Network tab
  3. Reload the page (Ctrl+R / Cmd+R)
  4. Click the Img filter to show only images
  5. Look at the Type column — you should see webp or avif instead of jpeg or png
  6. Click any image and check the Response Headers — look for content-type: image/webp or content-type: image/avif

If you see jpeg or png for images on Shopify's CDN (cdn.shopify.com), something is preventing conversion. Check whether the image tag in your theme code uses Shopify's Liquid image filters.

For a broader performance picture beyond just image formats, our Shopify speed audit guide walks through the full diagnostic process.

Image Upload Best Practices for Shopify WebP & AVIF

Shopify's auto-conversion works best when you upload properly prepared source files. Here are the rules that ensure maximum quality at minimum file size:

✅ Do This

  • Upload original JPEG or PNG — let Shopify handle conversion. Source quality matters more than source format.
  • Size images appropriately — product images at 2048×2048px max (Shopify's recommended maximum). Hero images at the exact dimensions your theme uses (typically 1920×800px or similar).
  • Use JPEG for product photos — smaller source file, better compression starting point.
  • Use PNG only when you need transparency — logos, icons, overlays. PNG for product photos wastes bandwidth.
  • Compress before uploading — use TinyPNG or Squoosh to remove metadata and optimize the source file. Shopify converts the format, but starting with a clean source helps.

❌ Avoid This

  • Don't upload pre-converted WebP files — Shopify may double-compress them, creating artifacts and potentially larger files than converting from the original JPEG.
  • Don't upload 6000px product photos — Shopify resizes them, but the original still takes up storage and slows admin operations.
  • Don't use BMP or TIFF — huge files that gain nothing. Convert to JPEG/PNG first.
  • Don't rely on format alone — a 4000px WebP image is still slower than a properly sized 800px JPEG. Dimensions matter more than format.

Manual WebP Control with Shopify Liquid

While Shopify handles format conversion automatically for most cases, theme developers sometimes need manual control. Shopify's Liquid provides the image_url filter with a format parameter:

<!-- Force WebP format -->
{{ product.featured_image | image_url: width: 800, format: 'webp' }}

<!-- Let Shopify auto-negotiate (recommended) -->
{{ product.featured_image | image_url: width: 800 }}

<!-- Responsive with srcset (auto-format per browser) -->
<img
  src="{{ product.featured_image | image_url: width: 800 }}"
  srcset="
    {{ product.featured_image | image_url: width: 400 }} 400w,
    {{ product.featured_image | image_url: width: 800 }} 800w,
    {{ product.featured_image | image_url: width: 1200 }} 1200w"
  sizes="(max-width: 768px) 100vw, 50vw"
  alt="{{ product.featured_image.alt | escape }}"
  loading="lazy"
  width="800"
  height="800"
/>

In most cases, omitting the format parameter is better. This lets Shopify serve AVIF to browsers that support it (smaller than WebP) and WebP to the rest. Forcing format: 'webp' prevents AVIF delivery, which means larger files for Chrome and Firefox users who could receive AVIF.

For more on how image loading interacts with CSS and JavaScript optimization, see our LCP optimization guide — the hero image (often your largest image) is typically the LCP element and benefits most from format + loading optimization combined.

How WebP & AVIF Affect Shopify Core Web Vitals

Image format directly impacts two Core Web Vitals metrics that affect your SEO rankings:

LCP (Largest Contentful Paint)

Your hero image or largest product photo is usually the LCP element. Switching from JPEG to WebP can reduce this image's download time by 25-35%. Going from JPEG to AVIF can reduce it by 30-50%. On a 4G mobile connection, that can mean 200-500ms faster LCP. Combined with preloading and resource hints, format optimization can push LCP under the 2.5s threshold.

CLS (Cumulative Layout Shift)

Image format doesn't directly affect CLS, but it's related. Faster-loading images (thanks to WebP/AVIF) reduce the chance of late-rendering images causing layout shifts. The bigger CLS fix is setting explicit width and height attributes on <img> tags — see our CLS fix guide for details.

For the complete picture on Core Web Vitals, our Shopify Core Web Vitals guide covers all three metrics and how they interact.

⚡ Thunder + Shopify's Auto-Conversion = Maximum Image Speed

Shopify handles format conversion (WebP/AVIF). Thunder handles everything else:

Optimization Shopify CDN Thunder
WebP/AVIF conversion ✅ Automatic
Lazy loading offscreen images ✅ Automatic
Hero/LCP image preloading ✅ Automatic
Script deferral (faster image rendering) ✅ Automatic
CSS optimization (unblock rendering) ✅ Automatic

Together, Shopify's format conversion and Thunder's loading optimization typically improve overall speed scores by 27+ points. Plans start at $19.99/mo with a free trial.

Frequently Asked Questions

Does Shopify automatically convert images to WebP?

Yes. Shopify's CDN automatically serves images in WebP format when the visitor's browser supports it. This happens through content negotiation — the browser sends an Accept header listing supported formats, and Shopify's CDN responds with WebP if it's supported. You don't need to upload WebP files manually. However, this only works for images served through Shopify's CDN using the image_url Liquid filter or standard theme image tags. Custom HTML with hardcoded image URLs bypasses this optimization.

Does Shopify support AVIF images?

Yes. Since August 2022, Shopify's CDN automatically delivers images in AVIF format when the browser supports it and when AVIF produces a smaller file than WebP for that specific image. AVIF typically achieves 20-50% smaller file sizes than WebP, but encoding is slower and not every image benefits equally. Shopify handles this decision automatically — it compares WebP and AVIF output for each image and serves whichever is smaller.

Should I upload WebP images to Shopify or let it convert automatically?

Upload your original high-quality JPEG or PNG files and let Shopify convert automatically. Uploading pre-converted WebP files can actually backfire — Shopify may re-compress them, leading to double compression artifacts and larger file sizes than if you'd uploaded the original. The exception is if you need transparency: upload PNG for transparency needs, and Shopify will convert to WebP with alpha channel support.

Why are my Shopify images not being served as WebP?

Common reasons: (1) Images loaded via custom HTML or external URLs bypass Shopify's CDN conversion. (2) Background images set in CSS don't go through Shopify's image pipeline. (3) App-injected images may use their own CDN. (4) Metafield images accessed without the image_url filter won't be converted. (5) The visitor's browser doesn't support WebP (rare in 2026 — over 97% of browsers support it). Check Chrome DevTools Network tab, filter by 'Img', and look at the 'Type' column.

What's the difference between WebP and AVIF for Shopify stores?

WebP reduces file size by 25-35% compared to JPEG with near-identical quality and has 97%+ browser support. AVIF reduces file size by 30-50% compared to JPEG with slightly better quality at low bitrates, but browser support is around 93% (no IE11, limited on older iOS). For Shopify stores, you don't need to choose — Shopify's CDN automatically serves the best format for each visitor's browser. AVIF is served when supported and when it produces a smaller file than WebP.

Do I need an image optimization app if Shopify converts to WebP automatically?

Shopify's automatic format conversion handles the format side, but it doesn't handle everything. You still benefit from: (1) proper image sizing — uploading a 4000px image for a 400px display wastes bandwidth even in WebP, (2) lazy loading for below-fold images, (3) responsive srcset attributes for different screen sizes, and (4) alt text optimization for SEO. Thunder Page Speed Optimizer handles image loading optimization (lazy loading, preloading hero images, deferred offscreen images) as part of its broader speed optimization.

Get Your Shopify Images Loading at Maximum Speed

Shopify's automatic WebP and AVIF conversion is a solid foundation — it handles format optimization for most images without any work on your part. The gaps (custom HTML, CSS backgrounds, app images) are fixable with proper Liquid usage and smart theme development.

But format is only half the image speed equation. How images load matters just as much as how they're encoded. Lazy loading, preloading the LCP image, and deferring render-blocking resources all contribute to faster image rendering. Thunder Page Speed Optimizer handles the loading side automatically.

Test your store's image performance now — and check the diagnostics for any remaining image optimization opportunities. For the full optimization playbook, see our complete Shopify speed optimization guide.

Expert Speed Optimization for Your Store

Our team handles everything — theme optimization, app cleanup, Core Web Vitals guarantee. Most stores optimized in 2 weeks.

✅ Core Web Vitals Guarantee · ⚡ 2-Week Delivery · 🎁 6 Months Free Thunder

Starting from €1,500 · Learn more