Formats
PNG, WebP, JPEG, AVIF or JPEG XL: how to choose a format in 2026
Support data goes stale faster than advice about it. Here is where WebP, AVIF and JPEG XL actually stand in October 2026, and what each one costs you in bytes and compatibility.
At a glance
- WebP is effectively universal: caniuse puts full support at 97.08% of global usage, with full support from Chrome 32, Firefox 65 and Safari 16.
- AVIF reaches 96.33%: Chrome 85, Edge 121, Firefox 93, Safari 16.4 โ with Safari 16.1 to 16.3 partial and macOS 13 or later required.
- JPEG XL shipped in Chrome 155 and Firefox 158; Safari 17 decodes still files but cannot stream them progressively, and caniuse still lists Edge and Samsung Internet as unsupported while MDN lists Edge 155.
- JPEG is still the only format every upload form, printer and photo lab accepts without questions.
- PNG is still the only format that guarantees exact pixels and full alpha everywhere, on every platform.
- Measured cost of choosing lossless for a photograph: 1106.8 KB as PNG against 60.7 KB for the WebP at quality 80 the same pixels came from.
Where the formats stand in 2026
Support is the first question, because it decides whether any of the size arguments matter. These version numbers come from caniuse's feature data and MDN's format guide, read on 22 October 2026.
| Format | MIME type | First full support | Global usage (caniuse) | Caveats worth knowing |
|---|---|---|---|---|
| JPEG | image/jpeg |
All versions of every major browser | โ | No alpha channel at all |
| PNG | image/png |
All versions of every major browser | โ | Lossless, so large on photographic content |
| WebP | image/webp |
Chrome 32, Firefox 65, Safari 16, Edge 18 | 97.08% | Chrome 9โ31 was partial: no lossless, alpha or animation before 32; Safari 14โ15.6 needed macOS 11 Big Sur |
| AVIF | image/avif |
Chrome 85, Firefox 93, Safari 16.4, Edge 121 | 96.33% | No progressive rendering; Safari 16.1โ16.3 still images only and macOS 13+; Firefox needed 113 for animated sequences |
| JPEG XL | image/jxl |
Chrome 155, Firefox 158, Safari 17 | 43.26% full, 16.93% partial | Safari decodes stills but not progressively; caniuse lists Edge and Samsung Internet as unsupported, MDN lists Edge 155 |
| GIF | image/gif |
All versions of every major browser | โ | 256-colour palette, one transparent colour |
Two entries in that table deserve more than a line.
JPEG XL has two supporters that disagree. Caniuse's Edge row stays at "not supported" through Edge 155, while MDN's browser compatibility for JPEG XL lists "Chrome 155, Edge 155, Firefox 158, and Safari 17". Since Edge tracks Chromium's engine, the likely explanation is that caniuse has not picked up a Chromium flag change in the Edge channel โ but we are not going to declare one of them wrong. Test it: drag a .jxl into Edge on your own machine before betting a build pipeline on it. The Safari caveat is better documented and more consequential: Safari "does not support progressive download of JPEG XL files", so the file has to arrive complete before anything appears.
AVIF's support is broad but its feature set is not uniform. Caniuse's notes for Safari 16.1 through 16.3 read "supports still images. Animated image sequences are not supported", and Safari 16.1 requires macOS 13 Ventura or later, not the older macOS versions AVIF arrived for. Firefox 93 decoded still AVIF; animated sequences needed a preference in 111 and were on by default in 113. Chrome has carried full support since 85 with no qualifiers. So "AVIF works" is true, and "AVIF works the same way everywhere" is not.
What actually changed since the last round of format articles
Three things, and they point in different directions.
- WebP stopped being a decision. At 97.08% it is in the same category as JPEG and PNG for practical purposes. If you are choosing a lossy format today, WebP is the safe default and AVIF is the upgrade, not the other way around.
- JPEG XL went from "shipping soon" to shipping. Chrome 155 and Firefox 158 both decode it by default, after years of flag-gated experiments in both engines โ caniuse's Chrome row alone shows the sequence:
enable-jxlflag at 91, then 145 with progressive decoding still missing behind the flag, then a clean yes at 155. Firefox's path ran through Firefox Labs opt-in before 158. What has not changed is reachability: 43.26% full plus 16.93% partial is a two-browser story, and Apple's implementation renders stills without progressive display. - AVIF is where WebP was in 2020. Every engine has shipped it, and the deployment question has moved from "is it supported" to "have you wired up fallbacks".
The direction of travel is clear: lossless is a niche for assets that need guarantees, and the interesting competition is between lossy codecs. That does not make PNG obsolete โ it makes PNG's job narrower and more specific, which is what the rest of this guide is about.
One more thing has not changed, and it is the one that costs people the most time: the format a browser can decode is not the same as the format a destination accepts. A CMS, a marketplace listing form, a print pipeline, an email client or a colleague's older editor each make their own decision, and none of them consult caniuse. Support percentages tell you what is safe to serve; the rules of the platform tell you what is safe to submit. When the destination has handed you a folder of WebP files, converting several at once is faster than working through them one by one.
Format choice by use case
If you only read one table on this page, read this one. "Bytes" means what our own conversion benchmark measured on the same six images; "risk" means what breaks when the destination does not cooperate.
| What you are shipping | First choice | Fallback | Avoid |
|---|---|---|---|
| Photograph on a website | AVIF | WebP, then JPEG q80โ85 | PNG (18.2x the WebP in our test) |
| Photograph going to print or a lab | JPEG at high quality, 4:4:4 | TIFF/PNG for masters | Repeated JPEG re-saves |
| Logo, icon or UI asset with alpha | PNG | WebP | JPEG (no alpha) |
| Screenshot of an app or web page | PNG | WebP lossless, AVIF | JPEG q95 (752.0 KB for the same pixels) |
| Image in an email | JPEG or PNG | โ | AVIF and JXL |
| Marketplace, job board or form that validates uploads | PNG or JPEG | WebP last, and only if listed | Anything "modern" without a fallback |
| Master copy you will edit repeatedly | PNG (or JXL if your tools read it) | TIFF | Any lossy format |
| Animation | APNG or animated WebP | GIF when something old must read it | Stills in a sprite sheet you have to maintain |
| Art with fine smooth gradients | AVIF | WebP | PNG |
The pattern: transparency and repeat editing pull you toward PNG; continuous-tone photography pulls you toward AVIF or WebP; the destination's rules override both.
A thirty-second version of the same decision, in order. Ask who has to open this file. If the answer is "a browser I control", choose the smallest format that keeps what matters โ AVIF for photographs, PNG for flat art, WebP when you want one format to cover both. If the answer is "a form, an app or a person", read that destination's documented requirements first, because they are not negotiable and they are usually a short list. If the answer is "I do not know yet", PNG and JPEG are the only two answers that have never caused a rejected upload.
What lossy formats buy you on a photograph
On continuous-tone images the case for lossy is not subtle, and our measurements match the claims the format owners publish. The same 1600x1200 photograph came out as 1106.8 KB in PNG, 140.3 KB as JPEG at quality 85 and 54.5 KB re-encoded as WebP at quality 80 โ against a source WebP of 60.7 KB.
MDN's format guide summarises the encoder-side claims: "lossy WebP images are on average 25โ35% smaller than JPEG images of visually similar compression levels", "lossless WebP images are typically 26% smaller than the same images in PNG format", and for AVIF, that "lossy AVIF images are around 50% smaller than JPEG images". Google's own WebP documentation rounds that to "typically 30% smaller than comparable JPEGs and PNGs". Treat vendor figures as directional rather than exact โ they are measured on the vendor's corpus with the vendor's encoder, which is why we publish ours.
There is also a niche inside PNG worth knowing about before you abandon it: if the photograph has few enough distinct colours to fit a 256-entry palette, an indexed-colour PNG can be dramatically smaller than an unindexed one, and pngquant does exactly that as a lossy step, "often as much as 70%" according to its documentation. That is a lossy PNG, so the guarantees are gone โ but if you wanted guarantees, you would not be palette-quantising a photograph.
Where lossless still wins outright
Screenshots, UI assets, diagrams, text on flat colour and line art invert the picture completely, because their information lives in exactly the places a block-based lossy codec handles worst: hard edges, high-contrast type and large single-colour areas. Our screenshot test made the point twice โ the PNG output was 1157.2 KB, the lossy WebP re-encode of the same pixels was 152.8 KB, and JPEG's quality dial went from 170.9 KB at quality 40 to 752.0 KB at quality 95 while SSIM moved only from 0.9173 to 0.9345 and PSNR stayed within 0.05 dB of 26.7. You can spend four times the bytes and get the same picture back.
The same logic covers logos and icons, which additionally need alpha. If the least confident part of this decision is which lossy format to fall back on, the screenshot and text-heavy guide works through the numbers in detail, and the PNG compression guide explains what to change, and why PNG files get large is the same argument as a checklist.
Transparency, format by format
| Format | Alpha support | How it behaves |
|---|---|---|
| PNG | Full, 8- or 16-bit per sample | Unassociated alpha, preserved exactly; colour types 4 and 6, or a tRNS chunk |
| WebP | Full, 8-bit | Google's documentation highlights "lossy RGB with lossless alpha", a combination no older format offers |
| AVIF | Full | Listed by MDN among AVIF's features; carries alpha in the AVIF/HEIF container |
| JPEG XL | Full | MDN lists transparency alongside HDR, wide gamut and animation |
| JPEG | None | Transparency must be flattened onto a matte colour you choose |
| GIF | One index | One palette entry may be fully transparent; no partial coverage |
Our benchmark put numbers on the difference: PNG preserved the alpha plane exactly in both transparent test images โ transparent pixel counts matched and every alpha value landed within 1/255 of the original โ while the JPEG encode put transparent pixels 0.12 to 0.36 levels from pure white on average.
One consequence is easy to miss. WebP's lossy-RGB-with-lossless-alpha mode is often the smallest way to deliver a transparent product shot, and it is a poor way to edit one, because the colour data has already been quantised and every editing step starts from that. The normal workflow is to keep a PNG master and export a WebP for the page. If the WebP is all you have โ a supplier sent it, or it came off a marketplace listing whose copy you no longer control โ converting it back to PNG does not recover the lost colour detail, but it does give you a file your editor can cut, resize and mask without compounding the loss further.
Animation: GIF, APNG, animated WebP, animated AVIF
| Format | Colour depth | Alpha | Browser support |
|---|---|---|---|
| GIF | 8-bit indexed, 256 colours | One transparent index | All versions of every major browser |
| APNG | Same depths as PNG, including 24-bit | Full | Chrome 59, Edge 12, Firefox 3, Opera 46, Safari 8 |
| Animated WebP | True colour | Full, 8-bit | Full WebP support: Chrome 32, Firefox 65, Safari 16 |
| Animated AVIF | High bit depth, HDR | Full | Firefox 113+, Chrome 85+, Safari 16.4+; Safari 16.1โ16.3 did not support sequences |
APNG's advantage over GIF is not subtle: the PNG specification positions it as "a replacement for simple animated images that have traditionally used the GIF format, while adding support for 24-bit images and 8-bit transparency, which GIF lacks". Because APNG files are PNG files, an old decoder that ignores the animation chunks still shows the static image instead of failing โ which is why it is a safe replacement for GIF in contexts that already accept PNG.
Size is the catch. Every APNG frame is a lossless image, so a long animation is expensive in a way GIF's palette trickery at least kept small. If both the delivery target and the artefact allow it, an animated WebP or AVIF is smaller, and for short UI animations the difference is usually worth the extra conversion step.
Shipping a modern format without breaking old clients
A format choice you cannot fall back from is not a choice, it is a bet. Every one of the newer formats has a cheap fallback mechanism, and it costs you one extra element in the markup:
<picture>
<source srcset="photo.avif" type="image/avif">
<source srcset="photo.webp" type="image/webp">
<img src="photo.jpg" alt="Product on a workbench"
width="1600" height="1200" loading="lazy">
</picture>
The browser walks the sources in order and uses the first type it understands, so AVIF-capable clients never download the JPEG and nothing older than AVIF ever sees the .avif. Keep the width and height attributes on the img so layout does not jump while the file downloads, and keep the img source a real, reasonably compressed JPEG rather than a placeholder.
Four rules that stop fallbacks from becoming their own problem:
- Encode every format from the master, not from each other. An AVIF made from a WebP made from a JPEG compounds three generations of loss before anything reaches a screen.
- Do not mix dimensions between sources of the same picture. A 1600px AVIF beside a 4000px JPEG means the fallback silently becomes the heavy path for older devices.
- Serve the right MIME type.
image/avif,image/webp,image/jxlare what thetypeattribute and content negotiation match against; a misconfigured server that sendsimage/pngfor a WebP file defeats the whole mechanism. - Verify what was actually fetched. The network panel shows the file that landed, with its type and size. Checking it takes ten seconds and it is the only proof the
<picture>element did what you intended.
CSS background images have no <picture> equivalent with the same reach. If a background is a modern-format file, either accept a single format for all clients, or handle the swap in script after testing for decoder support โ but test, because a background that silently fails to render is worse than a slightly larger JPEG.
For anything that is a delivered image rather than a rendered one โ a file a person downloads, prints or uploads somewhere else โ the compatibility question is answered by the recipient, not the browser. That is the whole reason our converter exists: turn a WebP into a PNG or JPG when the destination demands it, rather than assuming the modern format will be understood.
Convert WebP files to PNG or JPG โ in your browser
Batch conversion, ZIP download, transparency kept. No upload.
Sources
- Caniuse feature data: WebP, AVIF and JPEG XL support tables and global usage โ https://caniuse.com/webp ยท https://caniuse.com/avif ยท https://caniuse.com/jpegxl
- MDN: Image file format guide โ browser versions, colour depth and feature lists per format โ https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Image_types
- PNG Specification, Third Edition โ APNG scope, alpha representation,
tRNSโ https://www.w3.org/TR/png-3/ - Google WebP compression documentation โ modes, transparency and typical savings โ https://developers.google.com/speed/webp/docs/compression
- JPEG XL overview, JPEG committee โ ISO/IEC 18181, lossless JPEG transcoding, progressive coding โ https://jpeg.org/jpegxl/
- pngquant โ lossy palette quantisation with alpha preserved โ https://pngquant.org/
- Measured sizes and scores used above: study-a-format.csv, study-b-jpeg-quality.csv โ ./assets/bench/