Merchants Answered
Operations answers for working Shopify merchants

Published 2026-12-03

Image optimization pipeline: a step-by-step that follows how practitioners actually do it

Product photography is the heaviest thing most stores ship, and the pipeline question is not which compressor to buy. It is where in your workflow an image gets resized, formatted, named, and checked, so that no 6 megabyte original ever reaches a product page because someone uploaded straight from a camera at 11 p.m. before a launch. Pipelines beat intentions because pipelines do not get tired before launches.

Shopify does a good deal of this work for you, resizing and serving modern formats through its CDN when the theme asks correctly. The pipeline below is about making sure your uploads and your theme actually let it.

Step one: fix the source, before any tool

Set an upload standard: images arrive at a maximum dimension matched to their largest display size, commonly around 2048 pixels on the long edge for product imagery, in a consistent aspect ratio per placement, with color profile sRGB. A 5000 pixel original buys nothing on a phone screen and costs everyone who loads it. Standardize the master file naming too, product and angle, so the pipeline's later steps can be checked by a human skimming a folder.

Decide the placements and their ratios once: product gallery, collection card, lifestyle banner. Mixed ratios in a gallery cause the layout shift and the cropped foreheads that make a store look careless, and no compressor fixes a ratio problem downstream.

Step two: let the platform do its part, and verify it did

Shopify's CDN serves resized variants and modern formats such as WebP where the browser supports them, when the theme uses the platform's image rendering properly. Themes that hard code original file URLs bypass all of that. Check your theme's image output on a live product page: view the served file sizes at phone and desktop widths and confirm you are getting sized variants, not the master file wearing a CSS costume.

Set dimensions in the markup so the browser reserves space, and treat the first product image as the LCP element it is: not lazy loaded, prioritized, while images below the fold and later gallery images lazy load properly. That one distinction, hero eager and the rest lazy, is where most of the practical win sits.

Step three: check the result like a buyer, on a phone

Load your top ten product pages on a mid range phone over a throttled connection and watch the gallery: does the main image arrive fast and stay put, do thumbnails pop in without shoving content, does zoom show a genuinely larger file or the same pixels stretched? Then run a page weight check and log the image share. Images should be the majority of a product page's weight; the question is whether they are earning it.

Close the loop in the workflow: whoever uploads images runs the same three checks on one page before publishing the batch. Two minutes, every time, is what makes it a pipeline rather than a cleanup project you repeat every spring.

Related reading on this site: Common checkout extensibility migration mistakes that waste money or cause problems, Common email capture and popups mistakes that waste money or cause problems, and Common internationalization (Markets) mistakes that waste money or cause problems. Each covers a neighbouring decision, and together they give the fuller picture.

Frequently asked questions

What size should product images be uploaded at?

Large enough for zoom and retina displays but not camera original size. Around 2048 pixels on the long edge is a common ceiling for product imagery; match it to your theme's largest display size.

Does Shopify compress images automatically?

Shopify serves resized variants and modern formats through its CDN when the theme requests images properly. Themes that link original files directly bypass the benefit, so verify what your pages actually serve.

Should the main product image be lazy loaded?

No. The first product image is usually the LCP element, the thing Core Web Vitals measures. Load it eagerly with dimensions set, and lazy load below fold and later gallery images instead.

Why do our images cause layout shift?

Usually missing width and height in the markup, so the browser cannot reserve space, or mixed aspect ratios in a gallery. Set dimensions and keep a consistent ratio per placement.