We encoded the same 21 images as AVIF and as WebP, to the same quality score, and compared the file sizes. Then we looked at each pair at 100%. AVIF was smaller on 20 of the 21. On some of those, the smaller file also looked worse.
One run, 21 images, one quality target, 20 November 2026. Treat the numbers as what happened on this set, not as a promise for your library.
Use AVIF for photos, screenshots, logos and QR codes. Use WebP for transparent product PNGs and for flat-colour artwork. The table below has the sizes, and the sections after it explain where the crops changed the answer.
If you want your own site checked before you switch anything, see how to bulk optimise an old WordPress media library. It starts with a backup and a sample of 50.
21 images, 3 in each of 7 types: phone photo, stock photo, product on white, transparent product PNG, screenshot, logo and QR code, illustration. The originals total 41.97 MB. Most are public domain files from Wikimedia Commons. The screenshots, the TIO gecko, the TIO banner and the QR code are our own.
Each image went through an open-source AVIF encoder (libaom) and an open-source WebP encoder (libwebp), lossy, with transparency kept. For each file we searched for the lowest-quality setting that still scored an SSIM of at least 0.98 against the original. SSIM is a similarity score. Both formats had to reach the same score, so the sizes compare like for like.
Two limits to know now. For three images (the two white-background pack shots, 07 and 08, and the plasticware PNG, 11) both encoders hit the lowest quality they offer and still scored above 0.98, so those savings are capped by the encoders, not by the match. And a matching score is not a matching look. The crops below show where it was not.
Note: one run on 21 images, one quality target (SSIM 0.98), 20 November 2026. “Smaller” is the AVIF file against the WebP file of the same image. KB and MB are decimal. The medians are per image, so a type with a few big files can look different when you add them up: the transparent PNGs are 4.8% smaller as AVIF in total, but the median image is 65.5% smaller.
Across the whole set, AVIF totals 5.56 MB against 8.76 MB for WebP, 36.5% smaller. The only image where WebP won on size was the transparent Game Boy PNG: 999,046 bytes as WebP against 1,041,536 as AVIF.
Read the 94.8% with care. It is the instruments illustration, and it is the file that looks worst in the crops (below). It is a measurement of a score, not a promise.
We saved a 400 by 400 crop at 100% for each image, original, AVIF and WebP side by side, taken from the hardest area of the image. Here is what they show.
Phone and stock photos: AVIF holds up. On the phone fruit photo (AVIF 773,998 bytes, WebP 1,244,140) the netting and the spotted skin look the same in both formats and close to the original. On the shop-sign photo, the Chinese text and icons stay legible in both. On the lake photo, the fir branches look alike. The exception is the orchid close-up. AVIF is 33,247 bytes and WebP 191,032, and the AVIF petal is visibly softer, with the fine spots smoothed into blobs. WebP keeps more of the texture there.
Product on white: AVIF blocks at the floor. The whisky bottles are clean in both formats, AVIF at 46,098 bytes and WebP at 86,224. The two medicine-pack photos are the problem. AVIF came out at about 10 KB each, at the lowest quality the encoder offers, and the crops show square blocks across the foil and the tablet. WebP, at 54,150 and 64,612 bytes, shows no blocks, only some grain and colour speckle.
Transparent product PNGs: WebP. On the plasticware, the AVIF file (6,016 bytes) has lost the blue-grey tint, the prongs are flat grey, and the edges are smeared. The WebP file (46,210 bytes) keeps the colour and the edges. On the teacup, the AVIF gold pattern is blurred, with soft haloes where the lines were. The WebP one keeps its outlines, though it is softer and paler than the original. On the Game Boy, WebP is smaller and neither format shows an obvious fault in the crop, a flat grey panel.
Screenshots: AVIF, with one check. On the TIO home screenshot, text is sharp in both, but AVIF leaves soft smears in the flat colour bands. On the guide screenshot, the body text is readable in both, but the AVIF has visible smudging and pale smears around the letters. The WebP is clean. On the NerdCow home screenshot, the cookie banner text and buttons look identical in both.
Logos and QR code: AVIF. The TIO gecko with transparency is clean in both, with no halo. The banner version is a little smoother in AVIF and the dark glasses are the one place you can see it. On the QR code, AVIF keeps square black modules, while WebP has a faint grey haze in the white areas. We did not scan either one, so we cannot tell you a phone reads them.
Illustrations: it splits in two. The scanned drawings (the gecko with handwriting and the botanical print) look close to the original in both formats. On the gecko, AVIF thins the handwritten letters a little. The flat-colour clipart is where AVIF fails: the instruments illustration is 16,294 bytes as AVIF and 310,424 as WebP, and the AVIF crop has warped outlines and smeared colour fills. The WebP crop is close to the original.
Checked on 20 November 2026.
Browsers. Both formats work in the current version of Chrome, Edge, Firefox and Safari. The first versions with full support, from Can I use: for WebP, Chrome 32, Edge 18, Firefox 65, Safari 16 (Safari 14 and 15 partial); for AVIF, Chrome 85, Firefox 93, Edge 121, Safari 16.4 (desktop Safari 16.1 to 16.3 partial). Neither works in Internet Explorer. MDN's advice for AVIF is to include a fallback with the picture element for browsers without support.
WordPress. WordPress 5.8 added WebP uploads. WordPress 6.5 added AVIF uploads. In both cases it works only if your server's image library supports the format, and for AVIF the core team's note names the two libraries, Imagick and GD. To check: Tools, Site Health, the Info tab, then Media Handling, and look for AVIF in the list. If it is not listed, the fix is with your host, not in the Media Library.
If a format is not being served on your site even though the library supports it, that is a different problem: see WebP images not showing or not served in WordPress.
Phone photos: AVIF. 37.8% to 70.6% smaller than WebP, and no visible loss in the crops.
Stock photos: AVIF. Check macro shots with fine texture at 100%, as the orchid softened.
Product on white: AVIF for clean shots. If the encoder lands on its lowest quality and you see blocks, use WebP.
Transparent product PNGs: WebP. AVIF was smaller on two of three, but the crops show colour shift and smeared edges.
Screenshots: AVIF. Check the flat colour areas.
Logos and QR codes: AVIF.
Illustrations: WebP for flat-colour artwork, AVIF for scanned drawings.
TIO picks the output format for each image itself, so you do not choose one for the whole library. In our run of the free web tool on the same 21 images on 13 November, it chose AVIF for most photos and screenshots and WebP for the transparent PNGs and both PNG logos, and one image stayed a JPEG. That run is a separate test from the one on this page. It also reported smaller files than the originals on every image, between 28.0% and 96.2%.
If TIO skips an image in your library, why TIO skipped my image lists every reason.