The Four Formats, Technically Compared
JPEG (1992)
The oldest format in widespread use. Uses DCT lossy compression with chroma subsampling. No alpha channel support. Most efficient for photographs and complex photographic scenes.
Strengths: Universal compatibility, excellent for photos
Weaknesses: No transparency, no lossless mode, shows blocking artifacts at low quality
PNG (1996)
Lossless compression using DEFLATE plus delta filtering. Full alpha channel. Ideal for images where pixel-perfect accuracy matters.
Strengths: Lossless, full transparency, sharp edges preserved, no generation loss
Weaknesses: Large files for photographs, no lossy mode
WebP (2010)
Developed by Google. Two modes:
- Lossy WebP: VP8 intra-frame encoding — typically 25-35% smaller than JPEG at equivalent quality
- Lossless WebP: Typically 20-30% smaller than PNG for the same image
- Full alpha channel in both modes
Weaknesses: Not supported by very old software
AVIF (2019)
Based on the AV1 video codec. State-of-the-art compression efficiency.
- Lossy AVIF: typically 20-30% smaller than WebP at equivalent quality
- Supports HDR and wide color gamut
Weaknesses: Encoding is very slow (5-30 seconds per image), decoder support still incomplete on some older Android devices
Decision Table
| Use Case | Best Format |
|---|---|
| Web photograph (no transparency) | WebP lossy |
| Web image with transparency | WebP lossless |
| Logo / icon (flat colors) | PNG |
| Screenshot / UI mockup | PNG |
| Print / archival source | PNG or TIFF |
| Maximum web compression | AVIF |