JPEG vs WebP vs AVIF: Which Format Should You Use in 2026?
A practical comparison of JPEG, WebP, and AVIF for compression ratio, browser support, and visual quality, with guidance on when to use each format.
Written and reviewed by the Compress To KB editorial team. Last updated September 24, 2026. We build and maintain the compressor this guide refers to, so what we say about how it behaves comes from its actual code and from day-to-day use, not from guesswork.
Product photos do two jobs that pull in opposite directions. They have to look good enough to convince someone to pay, and they have to load quickly enough that the shopper is still there when they appear. Most stores lean too far in one direction: either raw camera files that make category pages crawl, or over-squeezed thumbnails that make the product look cheap. This guide shows how to find the middle, image by image, using target file sizes you can actually apply.
A blog post has one or two large images. A category page can have forty. If each product thumbnail is 600KB, the page weighs more than 20MB before you count scripts, and the shopper on a phone gives up scrolling long before the bottom. Because store pages multiply images, small savings per image compound quickly. Cutting a thumbnail from 600KB to 90KB across forty products removes roughly twenty megabytes from one page view. The link to search performance is covered in our guide to image size and Core Web Vitals, but even without any ranking effect, shoppers simply notice slow pages.
The mistake we see most often is applying one size to everything. A better approach is to decide by role:
Treat those as starting points. A plain white sneaker on a clean background compresses far better than a knitted jumper, so a smooth product can sit at the lower end of its range while a textured one needs the upper end.
Compression is applied last, not first. Shoot or export a clean master at a sensible size, something like 2000 pixels on the long edge is plenty for most stores, and keep it. Then create your compressed versions from that master, never from a previous compressed file. Every lossy save loses a little more, and re-compressing an already compressed JPEG stacks the artifacts. This is worth remembering because many platforms, including several hosted store builders, re-encode your uploads on their own image servers. If your upload is already squeezed to the limit, their conversion will squeeze it again. Upload something moderately generous, and let the platform do its final trim.
Returns caused by "it did not look like the photo" are expensive. Two habits help. First, shoot under consistent neutral light and check that your whites are actually white before you compress. Second, remember that browsers and canvases work in the sRGB colour space. If your camera or editor exported in a wider gamut such as Display P3, the compressed output will be converted to sRGB and very saturated colours can shift slightly. Check a vivid product, such as a red or a deep teal, side by side with the original before batch-processing a whole catalogue. If the shift is noticeable, adjust the colour in your editor and export again. It is a small check that prevents a large batch of disappointing images.
Look at your own analytics or heatmaps if you have them: people zoom into labels, textures and connectors. Text on packaging is the first thing to turn to mush under heavy compression, because JPEG creates small ringing artifacts around sharp edges. If a label must remain readable, give that image a bigger target, or export it in a format that handles edges better. Our guide on lossy and lossless compression explains why edges suffer and how to choose when the picture contains text.
For product photos on a white background, WebP is a strong default in the browser because it is smaller than JPEG at comparable quality and supported everywhere current. If your platform serves images through its own CDN, it may convert to WebP or AVIF automatically, in which case a well-made JPEG master is all you need to supply. Products with transparent backgrounds, such as cut-out furniture used in room scenes, need a format with alpha: WebP or PNG. For the wider trade-offs, see JPEG vs WebP vs AVIF. One caution about email: some desktop email clients still handle WebP and AVIF poorly, so use JPG for images that will be sent in newsletters.
Search engines and screen readers do not see your photo, they see the surrounding text. Give every image a descriptive file name such as navy-linen-shirt-front.jpg rather than IMG_4471.jpg, and write real alt text that describes what the picture shows. Use consistent aspect ratios across a category so the grid stays neat and does not jump as images load. And note that merchant platforms, including Google Merchant Center, accept very large files, which tempts sellers to upload raw camera output. That is convenient for the platform and bad for your storefront, so keep your on-site images light even when other channels are forgiving.
The tool handles one image at a time, so it suits small and mid-sized catalogues and quick fixes. If you have thousands of SKUs, you will want an automated pipeline on your server, and the target sizes above still tell you what to configure.
Store images are a series of small decisions, not one big one. Match the target to the job, protect the details shoppers zoom into, keep an untouched master, and test on a real phone. Do those four things and you will usually get a faster store and better-looking products at the same time.
Seasonal refreshes and new supplier photo drops often mean dozens or hundreds of images arriving at once. Resist the urge to apply one aggressive setting to the whole batch just to get it done quickly. Sort images into the same role-based buckets described above first, even a rough sort into "thumbnail", "main" and "zoom" folders takes only a few minutes, and then process each folder with its own target. It is far faster to fix a mis-sorted batch of raw photos than to redo three hundred over-compressed thumbnails after a customer complains that a product looks blurry.
It also helps to keep a short naming convention that survives re-exports, such as sku-angle-role.jpg. When a supplier sends a revised photo for one SKU, you can find and replace the exact file instead of searching through an unlabelled folder, and you avoid orphaned old images still being served from a cache.
If you sell on third-party marketplaces alongside your own store, remember that each platform re-encodes images on its own terms and often accepts a much larger upload than your website should ever serve directly. That is fine for the marketplace, but do not assume the same file is appropriate for your own product pages. Keep your on-site catalogue governed by the role-based targets in this guide regardless of what a marketplace allows, since your own page speed is not the marketplace's problem to solve.
A practical comparison of JPEG, WebP, and AVIF for compression ratio, browser support, and visual quality, with guidance on when to use each format.
A step-by-step guide to compressing photos and signatures under 50KB for SSC, UPSC, state PSC, and other government exam portals without losing clarity.
What actually happens to your photo when you use a typical online image compressor, and why browser-based, client-side tools are a fundamentally safer choice.