AVIF vs WebP: which modern image format should you use?
Both formats beat JPEG and PNG on the web. AVIF usually wins on file size for photos; WebP wins on speed, tooling and graphics. Most sites are best served by using each where it is strong.
Processed locally in your browserFor photographs on a website, AVIF usually gives the smaller file at the same visual quality. WebP is much faster to encode, is handled by more software outside the browser, and is the better choice for screenshots, graphics and big batches. A sensible default is AVIF for large photos with WebP or JPEG as a fallback, and WebP for everything else.
Both formats are supported by every current major browser, so the choice is less about whether people can see the image and more about file size, how long it takes to make, and what the image contains. The rest of this article goes through each of those, then shows how to try both on your own pictures.
AVIF and WebP at a glance
| AVIF | WebP | |
|---|---|---|
| Built on | A still frame of the AV1 video codec | A still frame of the VP8 video codec (lossy) plus a separate lossless format |
| Typical strength | Smallest photos, smooth gradients, skin and sky | Fast encoding, screenshots and graphics in lossless mode |
| Colour depth | 8, 10 or 12 bits per channel; HDR and wide gamut | 8 bits per channel; lossy WebP always stores colour at quarter resolution (4:2:0) |
| Transparency | Yes | Yes |
| Animation | Yes | Yes |
| Progressive loading | No | No |
| Full browser support (caniuse, 4 Nov 2026) | About 96% of global usage | About 97% of global usage |
| Encoding speed | Slow: seconds for a large photo | Fast: usually milliseconds |
The WebP limits come from Google's WebP FAQ, which also caps a WebP image at 16383 × 16383 pixels; support figures are from caniuse.com/avif and caniuse.com/webp, checked on 4 November 2026. Support figures change as people update their browsers, so check again if you are reading this much later.
Which one makes smaller files?
For photographs, AVIF usually does. MDN's image format guide summarises one published comparison on the same set of JPEG photos as a median 50% saving for AVIF against 30% for WebP (MDN, last modified 8 October 2026). Treat that as one test on one set of images, not a promise: the gap depends on the picture and on the quality you pick for each format.
AVIF's advantage is largest on smooth tones — skies, skin, studio backdrops — where JPEG and lossy WebP start to show banding or blocks. At aggressive settings AVIF tends to smooth fine texture away rather than show artefacts, which looks cleaner but is still lost detail, so compare at 100% zoom before you settle on a quality.
For screenshots, diagrams, logos and anything with small text, the comparison changes. Lossy encoding of either kind blurs sharp edges and coloured text, and MDN advises lossless encoding for that kind of image. Lossless WebP is well established for it; for flat graphics, PNG or an SVG may be just as small. Our lossy vs lossless explainer covers why.
How long does each take to make?
This is where WebP is clearly ahead. Browsers that can write WebP do it with their own built-in encoder, which is quick. No current browser can write AVIF from a canvas, so tools that run in the browser — ImageDoctor included — have to bring their own AVIF encoder.
- WebP in ImageDoctor uses your browser's own encoder. The WebP option only appears where the browser can actually produce one.
- AVIF in ImageDoctor uses libavif compiled to WebAssembly. The encoder (about 3.5 MB) downloads the first time you save an AVIF, and encoding runs on your device. Images up to 4 megapixels are encoded at speed 6, up to 12 MP at speed 8, and anything larger at 9, trading a little compression for an encode that finishes.
- Lossy AVIF is saved with colour at quarter resolution (4:2:0), the usual choice for photos. Quality 100 switches to lossless with full-resolution colour (4:4:4).
For one hero image the extra seconds don't matter. For a folder of 300 product photos, or images generated on a server for every upload, WebP's speed is a real advantage.
Can everyone see them?
In a browser, almost everyone. MDN lists AVIF support from Chrome 85, Edge 121, Opera 71, Firefox 93 and Safari 16.1; WebP has been supported for longer. Outside the browser it is patchier: some older desktop apps, operating systems and upload forms still refuse AVIF, and a few refuse WebP. If you are sending a picture to a person or a system you don't control, JPEG is still the safe choice.
On a website, MDN still recommends offering a fallback, which costs nothing: list the formats in order inside a <picture> element — a <source type="image/avif">, then a <source type="image/webp">, then an ordinary <img src="photo.jpg">. Each browser takes the first one it understands.
Search engines are not a reason to avoid either. Google's image guidelines list both WebP and AVIF among the formats Google Search supports (Google Search Central, checked 4 November 2026).
Which should you use?
| Image | Use | Why |
|---|---|---|
| Large photos: hero images, galleries, product shots | AVIF, with WebP or JPEG as fallback | The biggest images gain the most bytes, and there are only a few of them to encode |
| Everyday photos in bulk | WebP | Most of the saving over JPEG, at a fraction of the encoding time |
| Screenshots, UI, text, diagrams | Lossless WebP or PNG; SVG if it is vector | Lossy encoding blurs sharp edges in either format |
| Photos with HDR or wide colour | AVIF | WebP is limited to 8-bit colour |
| Anything you email or upload elsewhere | JPEG | Accepted everywhere |
Whichever you pick, resizing to the size the page actually displays usually saves more than the format change. A 4000-pixel photo shown at 1200 pixels wide is mostly wasted bytes in any format. Our guide to optimising images for a faster website puts the two together.
Try both on your own images
- Open the Image ConverterAdd a few typical photos to the Image Converter. They are processed in your browser and not uploaded to ImageDoctor.
- Export as WebP, then as AVIFChoose WebP as the output and note the sizes, then switch to AVIF. The converter starts at quality 85 for both; lower each until you can just see a difference at full size.
- Compare at 100% zoomLook at skies, faces, fine texture and any text. Keep the smaller file only if it still looks right.
For a single JPEG there is also a dedicated JPG to AVIF converter. To resize, re-encode and strip metadata in one pass, the Image Optimizer picks WebP automatically where your browser can write it.
Common questions
Tools in this article
Format reference
Keep reading
- JPG vs PNG vs WebP vs AVIF: which image format should you use?A practical comparison of the four formats that matter, what each one is genuinely good at, and how to convert between them without losing transparency.Guides
- WebP vs JPG vs PNG: which format is best for websites?How the three formats compare for web delivery: file size, transparency, browser support and fallbacks — plus when converting to WebP isn't worth the effort.
- Lossy vs lossless compression, explained for imagesWhat lossy and lossless compression actually do to an image, which formats use each, what the difference looks like, and how to choose for photos and graphics.