I converted the same photos and screenshots to JPG, WebP and AVIF and measured every file
"Use WebP" and "use AVIF" are common advice, but the answer depends on what's in the image. So we converted the same files to each format and wrote down two numbers for every result: the file size and the PSNR (how close
"Use WebP" and "use AVIF" are common advice, but the answer depends on what's in the image. So we converted the same files to each format and wrote down two numbers for every result: the file size and the PSNR (how close the result is to the source, higher is closer).
Every result below is for the files we tested, on one machine. It isn't a rule for every image. The full write-up, with logos and transparent images, is in the original guide: Which image format for websites? JPG, PNG, WebP, AVIF.
Photos at full size
Five photos, converted at the default settings of our browser-based converters: AVIF quality 60, WebP quality 80, JPG quality 80 (MozJPEG).
| Photo (pixels) | AVIF 60 | PSNR | WebP 80 | PSNR | JPG 80 | PSNR |
|---|---|---|---|---|---|---|
| Lake (3024 × 4032) | 1.40 MB | 38.2 dB | 1.74 MB | 37.9 dB | 1.90 MB | 36.4 dB |
| Mug (2950 × 2847) | 72.7 KB | 43.0 dB | 150.8 KB | 43.2 dB | 321.6 KB | 44.9 dB |
| Shoe (3000 × 2254) | 96.9 KB | 41.5 dB | 159.1 KB | 41.7 dB | 270.3 KB | 42.4 dB |
| Vase (4000 × 6000) | 22.2 KB | 43.1 dB | 143.9 KB | 42.8 dB | 357.1 KB | 43.6 dB |
| Lake, web copy (1280 × 1707) | 552.5 KB | 37.7 dB | 608.7 KB | 36.1 dB | 554.2 KB | 29.4 dB |
What we saw:
- AVIF 60 made the smallest file in 5 of 5. Its PSNR was higher than JPG 80's in 2 of 5 and lower in 3 of 5.
- WebP 80 was smaller than JPG 80 in 4 of 5. On the lake web copy it was larger (608.7 KB against 554.2 KB). That file was already a JPG, so this row is one more lossy step on top of an earlier one.
Quality numbers aren't comparable across encoders. AVIF 60 and JPG 80 are not "the same quality", which is why the size and the PSNR need to be read together.
Photos resized to 1200 px
Closer to what a website actually serves: four photos resized to 1200 px wide, then saved as JPG, WebP and AVIF, all at quality 75.
| Photo, 1200 px wide | JPG 75 | PSNR | WebP 75 | PSNR | AVIF 75 | PSNR |
|---|---|---|---|---|---|---|
| Mug | 51.1 KB | 41.5 dB | 28.9 KB | 40.9 dB | 35.0 KB | 42.9 dB |
| Shoe | 33.8 KB | 39.7 dB | 23.4 KB | 40.3 dB | 32.3 KB | 42.6 dB |
| Guidepost | 303.8 KB | 31.0 dB | 329.9 KB | 34.7 dB | 475.7 KB | 39.9 dB |
| Shoe, from AVIF | 33.3 KB | 40.7 dB | 22.9 KB | 41.5 dB | 31.4 KB | 44.7 dB |
- WebP 75 made the smallest file in 3 of 4. On the guidepost photo JPG 75 was the smallest.
- AVIF 75 had the highest PSNR in 4 of 4, and was larger than WebP 75 in 4 of 4.
So at the same quality number, the smallest format changed between the full-size test and the resized test. That's the main reason we don't give a one-line answer.
Screenshots
Two screenshots: a Wikipedia page (1776 × 960) and a browser window (2880 × 1628). PSNR compares each file with the source PNG.
| Format | Wikipedia page | PSNR | Browser window | PSNR |
|---|---|---|---|---|
| Source PNG | 441.0 KB | – | 1.87 MB | – |
| JPG 80 | 262.6 KB | 31.7 dB | 369.1 KB | 35.2 dB |
| JPG 90 | 439.9 KB | 36.2 dB | 591.1 KB | 39.0 dB |
| WebP 80 | 195.4 KB | 34.1 dB | 259.9 KB | 38.2 dB |
| AVIF 80 | 102.9 KB | 34.7 dB | 174.2 KB | 39.1 dB |
- AVIF 80 made the smallest file in 2 of 2.
- The highest PSNR was JPG 90 on the Wikipedia page and AVIF 80 on the browser window.
Transparency, briefly
JPG can't store transparency. WebP and AVIF can. In our test, AVIF at quality 75 changed the alpha value of some pixels in a logo (96,069 pixels, by up to 31 out of 255) and an icon (8,902 pixels, by up to 24), so check edges on transparent images at the size you'll show them. The guide has the full transparency results.
How we measured
- Chromium 158 on an Apple M3, one run per setting, on one machine, early December 2026.
- Encoders running in the browser: MozJPEG, libwebp, libavif (speed 6, 4:2:0, 8 bit).
- All source files from Wikimedia Commons, CC0. The list is in the guide.
- PSNR per RGB channel. It isn't a measure of how a picture looks to people.
- 1 KB = 1,000 bytes.
What we didn't test
- Lossless WebP.
- Page load time and LCP.
- SSIM or other quality scores, and how the images look to people.
- Other encoders (server plugins, image editors) and other machines.
- More files: 2 to 5 per image type is a small sample.
If you've measured something similar with different encoders or a bigger set of files, I'd like to see how your numbers compare.
The conversions were done with Pixlune, a free image converter that runs in the browser; files are not uploaded to a server.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.