DailyConvertTools

Image Format Wars: WebP vs AVIF vs JPEG XL Performance Guide

A side-by-side comparison of JPEG, WebP, AVIF and JPEG XL: compression, quality, features, encoding speed and browser support, and which format wins for each job.

For decades, JPEG was the only real choice for photos on the web. Now there are three serious challengers: WebP, AVIF and JPEG XL. Each promises smaller files at the same quality, but they differ in features, speed and, crucially, where they actually work. Here's how they compare.

The Contenders

JPEG (1992): the format behind most of the world's photos. Supported by every browser, camera, phone and program. Its compression is dated, but it's fast and universal.

WebP (Google, 2010): based on the VP8 video codec. It offers lossy and lossless compression, transparency and animation in one format, and it's supported by all current major browsers.

AVIF (Alliance for Open Media, 2019): based on the AV1 video codec. It often produces the smallest files and supports HDR and wide colour. It's supported in current Chrome, Edge, Firefox and Safari (version 16 onwards).

JPEG XL (JPEG committee, finalised in 2022): designed as a long-term successor to JPEG. It has excellent compression, very high quality, progressive loading, and a unique trick: it can repackage existing JPEGs about 20% smaller with no loss, and convert them back exactly. Safari supports it; most other browsers don't enable it by default.

Head-to-Head

· JPEG · WebP · AVIF · JPEG XL

File size (photos) · Baseline · Smaller · Often smallest · Smaller, close to AVIF

Quality at high settings · Good · Good · Very good · Excellent

Quality at low settings · Blocky · Blurry · Best · Very good

Transparency · No · Yes · Yes · Yes

Animation · No · Yes · Yes · Yes

Lossless mode · No · Yes · Yes · Yes

HDR / wide colour · Limited · No · Yes · Yes

Progressive loading · Yes · No · Limited · Yes

Encoding speed · Fast · Fast · Slow · Moderate

Browser support · Universal · All current major browsers · All current major browsers · Mainly Safari

Support outside browsers · Universal · Good · Growing · Limited

Exact savings depend heavily on the image and the encoder settings. Google reports lossy WebP at roughly 25 to 34% smaller than JPEG at similar quality, and AVIF is often smaller again, particularly when you're willing to accept a slightly lower quality. Always test on your own images.

Strengths and Weaknesses

JPEG

  • Wins on: compatibility, speed, simplicity. Every device and program can open it.
  • Loses on: file size, transparency and modern features. Repeated editing and saving degrades quality.
  • Best for: sharing files with people, email, printing and fallbacks.

WebP

  • Wins on: a balance of good compression, fast encoding and broad support. One format covers photos, graphics with transparency and animations.
  • Loses on: maximum compression (AVIF usually beats it), and it lacks HDR. Some older desktop software still can't open it.
  • Best for: the default "safe modern format" for websites; replacing PNG graphics and animated GIFs.

AVIF

  • Wins on: the smallest files for photos, strong quality at low file sizes, HDR and wide colour.
  • Loses on: encoding speed, which can be many times slower than JPEG or WebP; very large images can be demanding. Support in older software is patchy.
  • Best for: photo-heavy websites where every kilobyte counts, combined with a fallback.

JPEG XL

  • Wins on: quality at high settings, lossless JPEG recompression and progressive decoding. Many consider it the best-designed format technically.
  • Loses on: browser support. Without Chrome and Firefox enabling it by default, most websites can't rely on it yet.
  • Best for: archiving and photography workflows in software that supports it, and websites experimenting with Safari users. Watch this space.

Which Should You Use?

Situation · Best choice

Photos on a website · AVIF, then WebP, with a JPEG fallback

Graphics with transparency · WebP (lossless) or PNG; SVG for logos and icons

Replacing animated GIFs · Animated WebP, or a short MP4 video

Sending photos to someone · JPEG

Email newsletters · JPEG and PNG

Long-term photo archive · Keep the originals; JPEG XL if your software supports it

Serving Several Formats at Once

You don't have to pick a single winner. The <picture> element lets each browser choose the best format it supports:

<picture>
  <source srcset="image.avif" type="image/avif">
  <source srcset="image.webp" type="image/webp">
  <img src="image.jpg" alt="Description" width="1200" height="800">
</picture>

Image CDNs and many CMS plugins do the same thing automatically, converting each image on the fly and sending AVIF, WebP or JPEG depending on the visitor's browser. See our image format conversion guide for a step-by-step workflow.

The Verdict

  • Overall winner for websites today: AVIF for photos, served with WebP and JPEG fallbacks.
  • Best all-rounder: WebP, which is fast, widely supported and versatile.
  • Most compatible: JPEG, which isn't going anywhere for sharing, email and printing.
  • One to watch: JPEG XL, technically excellent but held back by browser support.

The format war doesn't need a single winner. With the right fallbacks, you can use the best format for each visitor and each image.

Try our free WebP converter and AVIF converter. Both run in your browser, so your images aren't uploaded.