AVIF vs WebP vs JPEG: which image format for your website
MDN's image format guide puts AVIF ahead on compression at comparable quality, with no progressive rendering and a shallow support history; WebP is the safer middle; JPEG and PNG cover browsers without modern format support. The decision, the picture-element markup, and the numbers, which vary by content, encoder and settings, per MDN and web.dev, read 21 November 2026.
Images are usually the heaviest part of a web page, and the format you encode them in decides a large share of that weight. Three names dominate the question today: AVIF, WebP and plain old JPEG (with PNG alongside for graphics). The right answer depends on what the image shows, which browsers must show it, and whether you can ship a fallback. Everything below comes from MDN's Image file type and format guide (last modified 5 November 2026) and web.dev's image guidance, both read 21 November 2026. The compression percentages quoted are MDN's guide-level figures from tests at comparable quality settings, not our measurements; actual results vary with image content, encoder and settings, so treat them as starting points and test before converting a whole library.
First: does this need to be a raster image at all?
web.dev's guidance starts one step earlier than format choice. If an effect can be produced with CSS (shadows, gradients, animations) or a web font instead of text baked into an image, that is resolution-independent, selectable, accessible and almost always fewer bytes. If the image is a logo, icon or simple geometric illustration, a vector format such as SVG stays sharp at every size. Raster formats earn their bytes when the scene is photographic. High-density screens raise the stakes: a 2x display needs four times the pixels of a 1x display for the same sharpness, so an oversized raster photo multiplies quickly. Only after that check does the AVIF versus WebP versus JPEG question begin.
AVIF: strongest compression in MDN's guide, two catches
AVIF is a royalty-free format built on the AV1 video codec, and MDN's guide reports the strongest compression of the three in tests at comparable quality: lossy AVIF images come out around 50% smaller than JPEG at visually similar quality, and MDN cites a comparison by CTRL Blog finding median savings of about 50% versus 30% for WebP on the same JPEG set. These are guide-level tendencies from particular tests and settings, not promises - actual results vary with image content, encoder and settings. Two catches keep it from being the automatic pick. First, AVIF does not support progressive rendering: nothing displays until the whole file has arrived. MDN notes this often matters little in practice precisely because AVIF files are smaller, but for large images the lack of progressive display can become significant. Second, its support is modern but shallow. Per MDN's compatibility data, AVIF needs Chrome 85, Edge 121, Opera 71, Firefox 93 (Firefox 113 for animated images) or Safari 16.1 - current browsers are covered, but anything older sees nothing unless you provide a fallback.
WebP: the safe middle
WebP trades a little compression for a deeper support history. MDN's figures: lossy WebP is on average 25 to 35% smaller than JPEG at visually similar compression levels, and lossless WebP is typically 26% smaller than the same image as PNG. It also handles animation, which makes it a practical GIF replacement. Support is broad in the latest versions of all major browsers, but MDN cautions it lacks deep historical support and still recommends a JPEG or PNG fallback. One version note worth checking for your audience: per MDN, WebP on macOS has a two-part floor - Safari 14 or later and macOS Big Sur (11) or later. That is the earliest supported pairing on macOS, not a statement about Safari on other platforms.
JPEG and PNG: the compatibility floor
JPEG remains the most widely supported lossy photo format, readable by effectively every browser ever shipped, including legacy ones. PNG is the lossless counterpart: MDN recommends it over JPEG when precise reproduction matters or transparency is needed, at the cost of much larger files. MDN's own framing is that the older formats perform poorly next to WebP and AVIF but enjoy broad historical support - and that browsers lacking support for the newer formats now have virtually zero market share. In practice that makes JPEG and PNG less the destination and more the compatibility fallback: the formats to include when your audience includes browsers without modern format support.
How to ship a choice, not a gamble
MDN's repeated recommendation for handling uneven support is the <picture> element: list the AVIF source first, then WebP, then a JPEG or PNG <img> as the final fallback, and each browser picks the first format it understands. Whether the closing JPEG or PNG fallback is needed depends on your audience: if everyone you target runs a current browser, AVIF or WebP alone is enough; add the fallback when you need to reach browsers without modern format support. Visitors on current browsers get the small file; everyone else still gets an image. Two disciplines make the decision real rather than theoretical. Encode your own images and compare bytes and visible quality - the percentages above are guide-level figures, and results vary with image content. And decide per image class: a photo gallery, a screenshot with sharp text, and a transparent logo are three different decisions.
Which format for which job
Photographs and hero images: AVIF first inside <picture>, with WebP as the middle step and a JPEG fallback when your audience includes browsers without modern format support. Screenshots and graphics with sharp edges or text: PNG or lossless WebP, since lossy JPEG artifacts show worst there. Transparency: PNG, WebP or AVIF - never JPEG, which has no alpha channel. Animation: WebP (or APNG per MDN's table) instead of GIF. Logos, icons and simple illustrations: SVG, per web.dev's vector guidance, with no raster format involved. And JPEG XL, the other name that comes up: MDN notes its browser support is not yet universal, so it needs the same fallback treatment rather than replacing anything today.
Sources, both read 21 November 2026: MDN, Image file type and format guide (page last modified 5 November 2026; per-format compression figures including lossy WebP 25-35% smaller than JPEG and lossy AVIF around 50% smaller; AVIF-vs-WebP median figures citing CTRL Blog; AVIF's lack of progressive rendering; browser compatibility floors; the <picture> fallback recommendation); web.dev, Choose the right image format (image-necessity check; CSS and web fonts versus baked-in text; vector versus raster; high-density screen pixel math).
Frequently asked questions
Is AVIF supported in all browsers now?
All current major browsers, per MDN's compatibility data: Chrome 85, Edge 121, Opera 71, Firefox 93 (Firefox 113 for animated AVIF) and Safari 16.1 or later. But that support has little historical depth, so anything older than those versions shows nothing - include a WebP, JPEG or PNG fallback with the <picture> element if those older browsers matter to you.
Is WebP always smaller than JPEG?
On average, per MDN: lossy WebP is 25 to 35% smaller than a JPEG of visually similar quality, and lossless WebP is typically 26% smaller than the same image as PNG. These are guide-level averages, not guarantees for a specific image - encode your own files and compare.
Does AVIF support progressive rendering?
No. MDN states AVIF files must be fully downloaded before they can be displayed. It also notes this often has little real-world impact because AVIF files are much smaller and download faster, but for large images the lack of progressive display can become significant.
Can I just delete all my JPEGs?
That depends on your audience. If you need to reach browsers without AVIF or WebP support, JPEG and PNG are the formats effectively every browser reads, so they belong at the end of the fallback chain. If your visitors all run current browsers, you can ship AVIF or WebP alone.
What about JPEG XL?
MDN's guide notes JPEG XL support is not yet universal across browsers and recommends providing an alternative format such as AVIF, WebP or JPEG alongside it. Treat it as experimental for general web delivery today rather than a replacement.
What format should logos and icons use?
None of these three. web.dev's guidance is that vector formats such as SVG suit logos, icons and geometric illustrations because they stay sharp at every resolution and zoom level. Reach for AVIF, WebP or JPEG when the image is photographic.