Shopify Image Optimisation: Sizes, Formats and Theme Fixes

WebP and AVIF Images in Shopify: What Actually Needs Optimising

Short answer: Shopify image optimisation means delivering appropriately sized images, loading visible photography promptly and preserving the detail shoppers need to buy. Shopify’s image CDN handles automatic format selection, including WebP and AVIF. Your job is to upload useful originals, make the theme request suitable versions and check what the browser actually downloads. Converting your entire catalogue by hand is not the starting point.

📌 In short

Audit a product page, a collection and your homepage before installing a compression app. Check downloaded dimensions, loading order, image quality and variant accuracy. Fix shared templates before replacing files across the catalogue.

Shopify image optimisation: what to fix first

Start with the storefront problem, not the file extension. The same slow-looking gallery can have an oversized image, a delayed request or a script that keeps the image hidden after downloading it. Each needs a different fix.

ProblemCheckAction
A small card downloads a large imageSelected source, rendered width and screen densityCorrect responsive candidates and the sizes attribute
The main product photo appears lateRequest start time, lazy loading and gallery scriptsExpose the image in the initial HTML and load it eagerly
Zoom looks blurryOriginal detail and the source used by the zoom viewReplace a poor original or request an appropriate derivative
Prices and buttons move during loadingImage dimensions and reserved media spaceReserve the correct aspect ratio
A selected colour shows the wrong photoVariant media assignments and gallery stateFix the product data or switching logic
Hidden slides download immediatelyRequests before scrolling or interactionDefer hidden media instead of merely compressing it

Fixing the shared product-card component can improve delivery across every collection using it. Compressing individual originals leaves an oversized request oversized.

What Shopify handles automatically

Shopify’s CDN can resize images and select a supported delivery format. Its image_url documentation explains these transformations and automatic format selection. You do not need a WebP original to deliver WebP to a shopper.

A Shopify image URL ending in .jpg can return a different format. Inspect the response Content-Type in your browser’s Network panel rather than judging the filename.

Hardcoded CDN URLs and CSS backgrounds do not inherently disable format negotiation. Their common weaknesses are missing responsive options, excessive requested dimensions and late discovery. Images served by an app or another host use that provider’s delivery system.

What your theme still controls

  • Which image appears in each location.
  • Which dimensions and responsive candidates the browser receives.
  • Whether the image is discoverable in the initial HTML.
  • Whether it loads eagerly or lazily.
  • Whether space is reserved before it arrives.
  • Whether variant changes preserve correct image behaviour.

Shopify can optimise the requested asset. It cannot correct a template that asks for an unnecessarily large image or waits for JavaScript before revealing its source.

Choose upload dimensions around the image’s job

There is no universal Shopify image size. A thumbnail needs less detail than a zoom view. A wide desktop banner needs different composition from a narrow mobile banner.

Shopify recommends 2048 × 2048 pixels for square product images in its product media guidance. Use that as a starting point for square photography, not an instruction to crop every product into a square.

UsePrepare the originalStorefront acceptance check
Product galleryPreserve detail for the largest view and zoomLabels, texture and edges remain clear when enlarged
Collection cardUse consistent framing and aspect ratiosThe card receives a suitable derivative, not the zoom asset
Homepage bannerCompose around desktop and mobile cropsThe product remains visible without awkward cropping
Transparent graphicPreserve transparency and clean edgesNo unwanted background or visible edge damage

JPEG is a practical photographic source format. PNG suits assets that need transparency or lossless graphic detail. Keep untouched masters outside Shopify so future edits do not repeatedly compress an already compressed file.

Do not sacrifice useful detail to reach an arbitrary file-size target. A wine label, fabric weave or furniture finish can answer a purchase question. Remove unnecessary bytes, not product evidence.

Source compression and delivered weight are different

A compression app may reduce stored originals while shoppers already receive transformed CDN versions. Those savings do not translate proportionally into every derivative.

Measure the actual downloaded image before and after a change. If its requested dimensions remain excessive, correct the theme output.

Make responsive image markup match the layout

The browser uses srcset to find available image candidates and sizes to understand the expected display width. It then selects a source using that information and the device’s screen density.

A collection card described as full viewport width can trigger an unnecessarily large download. The reverse problem produces soft images: the theme offers only small candidates for a large gallery slot.

Shopify’s image_tag filter supports responsive image markup. Give your developer these acceptance criteria:

  • Match the real slot. Account for grid columns, page margins and gallery layout at each breakpoint.
  • Offer useful candidates. Include dimensions suitable for the display size and screen density, without pretending a small original contains more detail.
  • Inspect the generated HTML. Confirm that source candidates, dimensions and loading attributes reach the browser.
  • Retest variant changes. Gallery scripts can replace correct initial markup with a different loading path.
  • Check app-built sections separately. They may bypass the theme’s shared image component.

Apply the fix in the shared snippet or section wherever possible. Our Shopify theme customisation guide explains how those components fit together.

Load visible photography before hidden media

Do not lazy-load the main image visible when the page opens. Put its source in the initial HTML rather than waiting for a gallery script to insert it.

Use fetchpriority="high" selectively for the likely Largest Contentful Paint image. Assigning high priority to every image defeats prioritisation. Shopify’s theme performance guidance covers image loading and resource priorities.

Product galleries

Separate the initial image from hidden slides and zoom originals. Check whether the gallery downloads every large asset before interaction. Keep alternate views available without making them compete with the first visible photograph.

Collection grids

Load initially visible cards normally and defer images further down the page. Check whether secondary hover images download immediately on mobile, where there is no hover interaction. Reserve consistent media space so cards do not push prices and buttons around.

Homepage banners

Use an HTML image for meaningful banner photography. Where separate mobile imagery improves composition, verify that the implementation does not download both desktop and mobile assets unnecessarily. Hidden with CSS does not automatically mean excluded from downloading.

Keep the image accurate, accessible and useful

Fast delivery is only part of the job. The image must match the selected product and explain what the shopper is buying.

In our Bongs Canada project, we stabilised mobile variant selection and synchronised variants with product images. The useful lesson is operational: include variant switching in image QA, not just visual checks on the default product state.

For Velur, technical work included fixing broken images and adding clear ALT text to more than 5,000 images. That calls for catalogue-level checks, not just a homepage speed test.

  • Does each selected colour or finish display the correct photograph?
  • Can shoppers inspect important material and packaging details?
  • Do mobile crops hide anything needed to judge the product?
  • Does informative photography have accurate alternative text?
  • Do purely decorative images use empty alternative text?

Describe what is visible. “Olive wood serving board with engraved initials” is more useful than a string of product keywords. Google’s image SEO guidance also explains crawlable image URLs and relevant surrounding content.

A repeatable image audit and developer handover

Test representative product, collection and homepage templates. Include variant-heavy products and app-built sections.

  1. Record the baseline. Save the URL, viewport, selected variant and performance report.
  2. Inspect requests. Reload with the browser cache disabled. Record the image host, response format, transfer size and requested dimensions.
  3. Compare source and display. Inspect the selected source against the rendered slot and screen density.
  4. Check loading order. Identify delayed visible images and early hidden-media downloads.
  5. Watch layout movement. Check whether images displace prices, text or purchase controls.
  6. Test interactions. Switch variants, swipe the gallery and open zoom.
  7. Repeat after deployment. Compare under matching conditions and confirm that product detail remains clear.

Log each issue with its controlling template, evidence and acceptance test. “Optimise images” is not a development brief. “Correct the collection card sizes attribute to reflect the grid width, then verify the browser selects an appropriate source” is.

Use the Shopify page speed checklist for competing scripts, fonts and broader loading issues. Keep this audit focused on image delivery and image behaviour.

When an image optimisation app earns its place

Install an app for a defined maintenance task: bulk processing, crop consistency, missing-description reporting or managing image work your team cannot sustain manually.

Distinguish background processing from storefront code. An app that edits files does not automatically add JavaScript to customer-facing pages.

  • Does it change originals, theme markup or delivery URLs?
  • Can you preview changes and restore original files?
  • Does it introduce a storefront script or another image host?
  • What remains after uninstalling it?
  • Does the browser download less, or does only the media-library total shrink?

Keep the app when it improves measured delivery or removes a real maintenance burden. Skip it when its main promise is a format Shopify already delivers.

Need to find which image problems actually deserve fixing?

🔍

Shopify PageSpeed Audit

We inspect image requests, loading order and responsive delivery across your key templates.

Get a speed audit →
⚡

Shopify Theme Development

We fix image output and gallery behaviour where your storefront needs custom development.

Fix the pipeline →
⚙️

Technical SEO for Shopify

We check image accessibility, broken assets and technical issues affecting your commercial pages.

Check the basics →
faq

Shopify Image Optimisation: Frequently Asked Questions

Open the image request used by the blurry view. A gallery can stretch a thumbnail or reuse a small derivative for zoom despite having a large original available. If the selected source is adequate, inspect the original at full size: missed focus, aggressive compression and artificial enlargement all reduce genuine detail.

No. Keep good originals and let Shopify select supported delivery formats. A catalogue-wide replacement creates work without correcting oversized requests, late loading or poor crops. If another system requires a specific source format, test that workflow separately rather than rebuilding the storefront media library around a filename preference.

Test the replacement process on a non-live product first. Record variant assignments and references in custom sections, galleries and integrations. Uploading a new file does not preserve every reference to the old asset. Keep originals and remove old media only after checking the product page, collection cards and connected channels.

The reported saving may concern stored originals rather than the CDN derivatives shoppers download. Alternatively, the page may be waiting for a script to reveal an image rather than waiting for its transfer. Compare actual network requests and the loading timeline before and after processing, not just the app’s dashboard total.

The theme may place the same wide image inside a tall mobile container using a cover crop. Check the section’s focal-point and mobile-image settings before editing the file. Where the composition cannot survive both shapes, prepare separate mobile photography and verify the theme selects it without downloading unnecessary alternatives.

Treat media replacement as a channel change as well as a storefront edit. Connected apps can use product media, variant assignments or separately configured image fields. After replacing an asset, inspect the image URL submitted by each integration and confirm that the correct product or variant remains pictured before removing old files.