Short answer
Use an image CDN, a service that stores your images and sends them to visitors fast. Sirv checks which formats each browser can show and sends AVIF, then WebP, then the original JPEG or PNG, all from the same image URL. You change nothing in your HTML, and it works on every Sirv plan.
After reading this you will know
- How a browser tells the CDN which image formats it can show
- How much smaller AVIF and WebP were than JPEG on our product photos
- Why you can keep .jpg in your image URLs
- Which Sirv settings turn the automatic format on, off or fixed
- What to check after you switch
What is automatic WebP and AVIF format negotiation?
Format negotiation means the image CDN (the service that stores and sends your images) picks the file format for each visitor, based on what their browser says it can show.
You upload one JPEG or PNG and keep one image URL. A visitor on a new browser gets an AVIF file from that URL, a visitor on an older browser gets JPEG, and neither of them notices anything.
On Sirv this is the default, called format=optimal, and it is part of every plan, including the free plan.
Paid plans start at $19 a month, and Sirv serves images to 50,000+ customers from 24 CDN locations.
Try it: open this photo in Chrome. The address ends in .jpg, but in our test on 10 Nov 2026 Chrome received an AVIF file of 31.6 KB.
To see it yourself, right-click the page, choose Inspect, open the Network tab and reload: the Type column shows avif.
Why are WebP and AVIF smaller than traditional JPEG and PNG files?
WebP and AVIF are smaller because they use newer ways to compress a picture, borrowed from video formats.
JPEG dates from 1992 and PNG from 1996. Google released WebP in 2010, and AVIF followed in 2019, built on the AV1 video format.
Both newer formats are better at smooth areas such as a white background or a soft shadow, which product photos are full of. Both can also keep a transparent background, which JPEG can’t.
That makes them a smaller choice for cut-out products that you would otherwise save as PNG.
| Format | Our 5 photos, total | Size vs JPEG (lower is better) | Browser support | Best for |
|---|---|---|---|---|
| JPEG | 147.2 KB | 100% | Every browser | Older browsers, downloads, email |
| WebP | 121.6 KB | 83% | 97.2% of users, iPhones and iPads updated since September 2020 | Browsers without AVIF |
| AVIF | 86.1 KB | 59% | 96.7% of users, iPhones and iPads updated since March 2023 | Most visitors today |
Sirv test, 10 Nov 2026: five product photos on demo.sirv.com at 800 px wide, Sirv’s default quality of 80. Browser support from caniuse.com, checked 10 Nov 2026.
AVIF is not always the winner by the same margin. On a trainer photo it was 22% smaller than JPEG, and on a pair of headphones on white it was 56% smaller.
How does an image CDN detect browser support using HTTP headers?
The browser lists the formats it can show in a line called the Accept header, sent with every image request, and the CDN reads that line before it answers.
This is what Chrome sent for our test photo, and what came back. This part is for whoever builds your site:
GET /look.jpg?w=800 HTTP/2Host: demo.sirv.comAccept: image/avif,image/webp,image/apng,image/*,*/*;q=0.8
HTTP/2 200content-type: image/avifcontent-length: 31557cache-control: max-age=2591999The content-type line is what tells the browser how to read the file. When we sent the same request with Accept: image/webp,*/*, Sirv answered with WebP at 45.3 KB.
With only */*, meaning any format, which is what very old browsers and many other tools send, it answered with JPEG at 49.0 KB.
The CDN keeps a separate copy for each format.
In our test, a new AVIF size took 0.42 seconds the first time and was served from the CDN’s stored copy (its cache) on the next request, and the JPEG version of the same URL was made and cached on its own.
Do you need to change file extensions in your HTML code to serve next-gen formats?
No. With an image CDN, the .jpg in your image URLs can stay as it is, because browsers go by the content-type line (a label the server sends with every file) and ignore the extension.
Without a CDN, the usual way is a picture element that lists every format by hand. This part is for whoever builds your site:
<!-- Without an image CDN: three files per image --><picture> <source srcset="sofa.avif" type="image/avif"> <source srcset="sofa.webp" type="image/webp"> <img src="sofa.jpg" alt="Teal sofa" width="800" height="533"></picture>
<!-- With Sirv: one URL --><img src="https://demo.sirv.com/demo/snug/teal-w.jpg?w=800" alt="Teal sofa" width="800" height="533">The first version means making and storing three files for every image, at every size.
The second needs one upload, and your theme or store platform can keep using the image URLs it already has.
What is the file size comparison between JPEG, WebP, and AVIF across ecommerce photos?
On our five product photos, AVIF was 41% smaller than JPEG in total and WebP was 17% smaller. Each photo was requested at 800 px wide with Sirv’s default quality.
| Photo, 800 px wide | JPEG | WebP | AVIF |
|---|---|---|---|
| Portrait of a woman | 49.0 KB | 45.3 KB | 31.6 KB |
| Teal sofa on white | 41.8 KB | 30.4 KB | 23.5 KB |
| Headphones on white | 25.7 KB | 19.3 KB | 11.2 KB |
| Pink handbag | 17.4 KB | 13.4 KB | 9.5 KB |
| Trainer on grey | 13.3 KB | 13.2 KB | 10.3 KB |
Sirv test, 10 Nov 2026: each URL on demo.sirv.com requested with format=jpg, format=webp and format=avif, and the files measured as they arrived.
A transparent tennis ball PNG, 200 px wide, came to 13.9 KB as PNG, 6.9 KB as WebP and 5.0 KB as AVIF, and kept its transparent background in all three.
On these photos AVIF saved about 12 KB per image, so a product page with 30 images downloads about 370 KB less and shows sooner on a phone.
How fast the main image shows is part of what Google measures in Core Web Vitals, and smaller files also use less of your plan’s monthly transfer.
How do you configure automatic format conversion in Sirv?
You don’t need to configure anything, because format=optimal is Sirv’s default for every image.
Upload your JPEG or PNG files, use the links Sirv gives each file, and each browser gets the smallest format it can show.
The Sirv plugins for WordPress, WooCommerce, Magento and PrestaShop serve images through the same URLs, so they get it too.
Change the setting only when you need a fixed format:
| Add to the URL | What you get |
|---|---|
Nothing, or ?format=optimal | AVIF, then WebP, then the original format |
?format=original | Always the uploaded format, still compressed |
?format=jpg | Always JPEG |
?format=webp or ?format=avif | Always that format |
If you have used other image CDNs, you may try format=auto. On Sirv that returns an error and the image won’t show, so leave the format out instead.
To keep a setting for a whole site, save it in a profile (a named set of image settings in your Sirv account), and see the format options for the full list.
What should you check after you switch?
Check one image in each place your site shows images, and confirm that the format changes with the browser.
| Step | Done when |
|---|---|
| 1. Remove any format parameter from your image URLs | URLs end with only size settings, such as ?w=800 |
| 2. Open a product page in Chrome, right-click, choose Inspect, open Network and reload | The Type column shows avif for your images |
| 3. Open the same page on an iPhone | Images look the same as in Chrome |
| 4. Check download links and email images | They use format=jpg if they must open as JPEG |
| 5. Compare how much the page downloads before and after | The images add up to less |
Once these checks pass, new browsers get the smallest file without any work from you, and older ones still get a JPEG that works.
Was this article helpful?