The biggest saving on this site
AVIF is a still image wrapped in the AV1 video codec, developed by a consortium including Google, Netflix, Amazon and Mozilla to cut streaming bandwidth. It brings a decade of compression research that PNG, standardised in 1996, was never designed to compete with.
On the fixed test image used throughout this site: 3.97 MB as PNG, 109 KB as AVIF. Around 97% smaller.
For comparison, the same source came out at 247 KB as WebP and 375 KB as JPG.
Transparency survives
This is what makes AVIF a real PNG replacement rather than a partial one. AVIF stores a full alpha channel, including semi-transparent pixels, so a logo with soft edges or a product shot with a cut-out background converts cleanly.
JPG cannot do this — it has no alpha channel and fills transparent areas with white.
The cost is time
AVIF encoding is by a wide margin the slowest operation here. A large image takes seconds rather than milliseconds, because the codec is searching hard for an efficient encoding — and that search is precisely what produces the tiny file.
For a handful of hero images, encoded once and served millions of times, that trade is obviously right. For a bulk conversion of hundreds of files, WebP will finish in a fraction of the time for a file that is still far smaller than the PNG.
When to keep the PNG instead
Screenshots, diagrams, code samples, and anything where text must stay perfectly crisp.
Those images are mostly flat colour and hard edges — the content PNG compresses efficiently and stores exactly. Lossy compression of any kind softens text, and no quality setting fully avoids it. Optimising the PNG losslessly keeps every pixel and still reduces the file.