Zapixal Independent Research
Image Compression Benchmark 2026: JPEG vs WebP vs AVIF
An independent, reproducible compression benchmark comparing modern image formats across 20 real-world photographs and UI screenshots to measure byte reduction and encoding latency.
Max Reduction
78.48%
AVIF (libavif) Quality 80
Fastest Encoder
108 ms
WebP (11x faster than AVIF)
Universal Baseline
62.79%
MozJPEG (Universal support)
1. Executive Summary
- AVIF achieves the highest average size reduction (78.48%). Across our real-world dataset, libavif produced the most aggressive byte-saving at Quality 80, confirming its status as the most efficient next-generation codec for pure file-size minimization.
- WebP generated the smallest total volume (1.07 MB) at 11x faster encoding speeds than AVIF. While AVIF had higher individual average reductions, WebP (libwebp) excelled on dense screenshots and completed encoding in 108ms on average, compared to AVIF's 1247ms.
- MozJPEG remains highly competitive (62.79% reduction). Even against modern formats, a highly optimized JPEG encoder still drastically reduces raw uncompressed image sizes, proving its continued relevance for compatibility-first workflows.
Interactive Codec Comparison
Toggle dimensions to compare real-world performance metrics
JPEG(MozJPEG)62.79% reduction
WebP(libwebp)73.68% reduction
AVIF(libavif)78.48% reduction
PNG(UPNG)38.45% reduction
2. Dataset & Methodology
To ensure the findings apply to real-world usage rather than synthetic tests, the dataset consisted of 20 images totaling 6.55 MB of raw pixel data:
- 13 Photographs: Complex gradients, noisy natural environments, and high-frequency details (foliage, portraits, landscapes).
- 7 UI/Screenshots: Sharp vectors, flat color blocks, text elements, and application interfaces.
| Format | Codec & Version | Quality Target |
|---|---|---|
| JPEG | MozJPEG (@jsquash/jpeg) 1.6.0 | Quality 80 |
| WebP | libwebp (@jsquash/webp) 1.5.0 | Quality 80, Method 4 |
| AVIF | libavif (@jsquash/avif) 2.1.1 | Quality 80 |
| PNG | UPNG (upng-js) 2.1.0 | 256 Colors |
3. Full Benchmark Results
Aggregated results across all 20 files. Total starting volume was 6.55 MB.
| Codec | Avg Reduction | Total Output | Avg Latency |
|---|---|---|---|
| JPEG MozJPEG | 62.79% | 1.44 MB | 172 ms |
| WebP libwebp | 73.68% | 1.07 MB | 108 ms |
| AVIF libavif | 78.48% | 1.15 MB | 1247 ms |
| PNG UPNG | 38.45% | 3.65 MB | 231 ms |
Reproducibility
These benchmarks and codec validation tests are fully deterministic. Developers can verify the benchmark dataset schema and codec acceptance test suite locally:
npm testBenchmark Limitations
- • Dataset Size: 20 images is a representative sample, not a definitive global model.
- • WASM Memory: Testing was bound to single-threaded WebAssembly memory limits.
- • Fixed Quality: We targeted Q=80 universally, but codec quality scales vary.
4. Test It Yourself
We expose these exact WASM-compiled codecs through our free, client-side tools so you can run your own files through them: