Skip to main content
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.
FormatCodec & VersionQuality Target
JPEGMozJPEG (@jsquash/jpeg) 1.6.0Quality 80
WebPlibwebp (@jsquash/webp) 1.5.0Quality 80, Method 4
AVIFlibavif (@jsquash/avif) 2.1.1Quality 80
PNGUPNG (upng-js) 2.1.0256 Colors

3. Full Benchmark Results

Aggregated results across all 20 files. Total starting volume was 6.55 MB.

CodecAvg ReductionTotal OutputAvg Latency
JPEG MozJPEG62.79%1.44 MB172 ms
WebP libwebp73.68%1.07 MB108 ms
AVIF libavif78.48%1.15 MB1247 ms
PNG UPNG38.45%3.65 MB231 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 test

Benchmark 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: