Torn on png vs avif for your website? Use AVIF for photos and bandwidth savings, keep PNG for crisp graphics, logos and screenshots, and serve both when you can. Here is how to decide.
This guide sits inside our wider look at the best image format for websites, in case you want to compare more options.
| Item | Value |
|---|---|
| AVIF file size vs JPEG (same perceptual quality) | Typically 30-50% smaller |
| AVIF file size vs WebP (same perceptual quality) | 20-50% smaller |
| AVIF global browser coverage | Approximately 93% as of March 2026 |
| AVIF in Chrome and Opera | Supported since 2020 |
| AVIF in Safari | Supported since 2022 |
| PNG browser support | Guaranteed across all browsers for decades |
These figures come from Pixotter’s AVIF explainer and web.dev’s AVIF lesson. They can change, so check the source before you rely on them.
How PNG and AVIF differ
PNG is a lossless format that supports alpha transparency, but Smashing Magazine’s guide to modern formats points out that its compression, especially for photographs, is considerably low.
AVIF is an encoding based on the open source AV1 video codec. web.dev says it aims to cover PNG-like transparency and improved perceptual quality at smaller file sizes than JPEG or WebP.
The two formats do different jobs. Pixotter describes PNG as excelling at graphics with sharp edges, text and transparency, while AVIF’s real advantage is lossy compression of photographs.
AVIF is not lossy only. A DEV Community comparison notes that it offers both lossy and lossless options, and that both formats handle full alpha channel transparency.
File size: where AVIF wins and where it may not
Against older web formats the gap is clear. Pixotter’s explainer reports that AVIF files are typically 30-50% smaller than JPEG and 20-50% smaller than WebP at the same perceptual quality.
Against PNG, the result depends on the picture. A DEV Community comparison puts typical savings at 50-90% versus equivalent PNG files, yet Smashing Magazine cautions that AVIF may not compress non-photographic images as well as PNG or lossless WebP.

Read the bigger percentages as a best case for photographs. Flat logos, interface screenshots and text-heavy graphics are where PNG can hold its own.
So test with your own files. Cloudinary’s AVIF vs JPEG guide advises that savings depend on the content, so you should compare file size and visual quality at the size the image is displayed.
A fair test covers these checks:
- File size of the PNG, the AVIF and any WebP version at the same display dimensions.
- Visual quality when zoomed in, where blockiness and edge artifacts tend to show.
- Encoding time, because AVIF’s gains come at a computational cost.
Smashing Magazine says zooming in helps you spot blockiness or edge artifacts, and it calls the side-by-side view in Squoosh.app helpful. Pixotter adds that the compression gains require more computation to encode. This site has no affiliation with Squoosh or any other tool maker, and the mention is editorial only.
Browser support for AVIF and PNG
PNG is the safe baseline. web.dev states that support for GIF, PNG and JPEG is guaranteed across all browsers, and has been for decades.
AVIF arrived later. The same web.dev lesson says it was supported in Chrome and Opera since 2020, in Firefox in 2021, and in Safari in 2022.
Coverage has since grown. As of March 2026, Pixotter’s explainer puts AVIF at approximately 93% global browser coverage, so a small share of visitors may still need a fallback.
Missing that remainder matters. According to web.dev, a browser that cannot parse an encoding will discard the file without rendering anything at all, so those visitors would see a broken image.
Which format fits which image?
Pixotter’s rule of thumb is to use PNG for screenshots and logos, and AVIF for photos. That maps onto a simple checklist:
- Photographs and hero images: AVIF first, with a fallback.
- Logos and screenshots: PNG, since sharp edges and text matter.
- Flat graphics and text overlays: test both, because PNG may compress them better.
- Bandwidth as the top priority: lean toward AVIF if some loss is acceptable.
That last point echoes Smashing Magazine, which calls AVIF a solid first choice if lossy, low-fidelity compression is acceptable and saving bandwidth is the number one priority.
Whatever you choose, hold on to your originals. The DEV Community guide recommends keeping source files in PNG for archival and future conversions, and creating AVIF only for delivery.
Format choice also does not change accessibility, so every image still needs a description, as covered in our guide to png alt text.
Serving AVIF with a PNG fallback
web.dev explains that the plain img element made it exceptionally difficult to adopt any new image format, because it accepted only one source file. The workaround of sending the new format first and retrying a legacy one wasted a transfer.
The picture element solves this. In Pixotter’s example, the browser picks the first format it supports, so everyone sees the image and most visitors get the smallest version.
A simple setup looks like this:
- Export an AVIF copy of each heavy image and keep the PNG master.
- List the AVIF as the first source inside a picture element.
- Leave a PNG in the img tag as the final fallback.
- Load the page in an older browser to confirm the fallback appears.
The exact markup is covered in our guide to responsive images html.
Frequently asked questions
Is AVIF better than PNG?
Show answer
For photographs, usually yes on weight, since the files tend to be much lighter. For logos, screenshots and other flat artwork, PNG is still the cautious pick, so the content of the image decides.
Does AVIF support transparency?
Show answer
Yes. The DEV Community comparison says both formats offer a full alpha channel, so a cut-out logo can use either one.
Will AVIF break my site in older browsers?
Show answer
Only if you serve it on its own. When a fallback is listed, a browser that cannot read AVIF skips to the next option, and the visitor still gets a picture.
Should I convert all my existing PNG files?
Show answer
Not wholesale. Convert the heavy photographic images after testing, and leave small icons, logos and screenshots as PNG unless a comparison shows a clear gain.



