Published 2026-08-22

We measured AVIF, and decided not to offer it

The converter can write AVIF. It does not, and the three measurements behind that are worth more than the feature would have been.

Every image tool on this site converts between four input formats and three output ones. AVIF is in neither list, and the reason is not that it was never considered. It was measured, and then declined.

The engine is not the obstacle. wasm-vips writes real AVIF — the ftyp box carries avif as its major brand, and sharp reads the bytes back without complaint. What stopped it was three costs, each of which we could put a number on.

The download

The module that decodes and encodes AVIF, vips-heif.wasm, is 1,226,118 bytes gzipped. The path that already loads for SVG work is about 2.4 MB gzipped; adding AVIF takes it to roughly 3.6 MB.

That is not a rounding error on a page whose entire promise is that the work happens in your browser. Somebody arriving to convert one icon would pay half again as much download before anything appeared.

The determinism

This is the one that decided it.

Same source image, same machine, one engine — and only the thread count changed. WebP produced a byte-identical file at every setting. AVIF produced a different file at every setting: concurrency 1, 2, 4 and 8 gave four distinct SHA-256 hashes, with decoded pixels differing by 15 to 16 levels.

In a browser that number comes from navigator.hardwareConcurrency. So the same picture, converted by the same person on their phone and on their laptop, would come out as different bytes. The architecture here has a rule that the same input and the same version produce the same output — it is what makes a cache key mean anything — and AVIF does not hold it.

The time

A 1200×630 image took 3.4 seconds to encode. Throwing threads at it recovered about 3%. The performance bar for this phase is under two seconds for a warm end-to-end run, and AVIF misses it on its own, before anything else on the page has happened.

What the test suite already said

There is a conformance test that requires the two engines this project uses to agree exactly: for every output format, the maximum per-pixel difference between them must be zero. JPEG is zero. WebP is zero. AVIF is 62.

Adding AVIF to the format list would have done one of two things: turned that test red, or quietly weakened the promise for one format while the other two kept it. Neither is a trade worth a checkbox.

Why the page does not explain any of this

The converter does not carry a paragraph apologising for a format it does not offer. A tool that lists what it cannot do spends the reader's attention on an absence, and the reader did not come here with AVIF in mind — they came with a file.

The measurement is written down, though, because the decision has a reopening condition. If the module gets smaller, or the encoder becomes deterministic across thread counts, the arithmetic changes and the question is asked again. A decision without a stated condition for revisiting it is just a habit.

All notes