Skip to content

PNG, JPG and WebP compared: a file size benchmark

Reproducible measurements of file size, fidelity and encode time for PNG, JPG and WebP at several quality settings, in a browser.

By Convero · Published

In this test, JPG and WebP files were several times smaller than PNG for a photographic image, WebP was the smallest for graphics and screenshots, and raising quality from 90 to 100 roughly tripled JPG size. The method and script are public so the numbers can be checked.

Test setup

Measured on 6 December 2026 in a Chromium 156 browser on a 10-core Mac, using the browser's own canvas encoder, which is what Convero's image tools use. The three test images are generated from a fixed seed by scripts/benchmarks/image-benchmark.js in Convero's public repository, so anyone can run the same test. They are synthetic: the photo stand-in has strong fine grain, which makes lossless formats look worse than they would on a clean photo. Other browsers ship different encoders and will give different numbers.

Fidelity is reported as PSNR in decibels against the original pixels. Higher is closer; above about 40 dB differences are hard to see, and lossless formats are exact.

Study 1: the same image in each format

1920 × 1080, size (encode time, PSNR)
FormatPhoto stand-inFlat graphicScreenshot
PNG4,631 KB (59 ms, exact)133 KB (13 ms, exact)314 KB (10 ms, exact)
JPG q90653 KB (14 ms, 36.0 dB)99 KB (8 ms, 38.3 dB)313 KB (11 ms, 39.0 dB)
JPG q75287 KB (9 ms, 31.7 dB)70 KB (6 ms, 36.8 dB)218 KB (5 ms, 35.4 dB)
WebP q90660 KB (144 ms, 40.8 dB)43 KB (52 ms, 38.7 dB)204 KB (71 ms, 40.2 dB)
WebP q75326 KB (118 ms, 33.9 dB)30 KB (51 ms, 38.0 dB)141 KB (67 ms, 38.1 dB)

Study 2: quality setting against size

Photo stand-in, 1920 × 1080
QualityJPG sizeJPG PSNRWebP sizeWebP PSNR
1015 KB28.3 dB15 KB29.5 dB
3066 KB29.9 dB85 KB30.2 dB
50134 KB30.6 dB186 KB31.5 dB
60172 KB30.9 dB230 KB32.2 dB
70238 KB31.4 dB302 KB33.4 dB
80368 KB32.4 dB413 KB35.9 dB
90653 KB36.0 dB660 KB40.8 dB
1002,044 KB50.7 dB2,489 KBexact (lossless)

Findings

  • Quality 100 is rarely worth it: JPG grew from 653 KB at quality 90 to 2,044 KB at quality 100.
  • Between quality 50 and 80, JPG size almost tripled while PSNR rose by under 2 dB on this grainy image.
  • WebP gave the smallest files for flat graphics and screenshots by a wide margin.
  • PNG is a poor fit for photographs and grain: 4.6 MB against 287 KB for JPG at quality 75.
  • Results come from one browser and synthetic images; real photos without heavy grain compress better in every format.

Reproduce it

Open any page in a browser, open the developer console, paste the contents of scripts/benchmarks/image-benchmark.js from Convero's public repository and run it. It returns the same tables as JSON. Nothing is uploaded. The raw results of this run are in docs/growth/research/image-benchmark-2026-12-06.json in the same repository.

Tools for this