Format, usage and framing details for a cleaner result.
Why AVIF and WebP can both look good at different sizes
Both formats grew out of video compression, and AVIF comes from a newer design that searches harder for the cheapest way to describe each part of a picture. That extra searching is why AVIF can reach a smaller file at a similar look, and also why it takes longer to write. The saving is not guaranteed, because a picture that WebP already stores well has little left to gain. Test a typical image from your own site, a photograph and a graphic, rather than trusting a rule of thumb, and decide from the numbers you measure. A short test on five pictures tells you more than any general claim about either format.
What a second lossy pass does to a picture
A lossy file keeps an approximation of the scene. When you encode it again, the new encoder works from that approximation, not from the original. Smooth gradients can pick up faint bands, fine texture can turn waxy, and small text can soften a little. These changes are small at a sensible quality and larger when the WebP was already saved low. A good habit is to convert once, from the best available source, and to keep the original. If the AVIF looks worse than the WebP, the WebP was probably the limit, and the original is the better starting point. Encoding from the original also skips one generation of loss.
Animated WebP and the still AVIF
A WebP can hold an animation, like a short looping clip or a sticker. The AVIF written here is a single still image. When you convert an animated WebP, the result is its first frame, not a moving picture, on both routes, your device and our server. If the movement is the point, an animated WebP or a short video is the better format for it. For ordinary photos, logos and cut-outs the question never comes up, and the AVIF shows the same picture your WebP did, apart from the small loss of a second lossy pass. If you are unsure whether a file moves, open it in a browser first and watch it for a few seconds.
Size limits and odd dimensions
A single WebP over 20 megabytes is too large to send, so it is encoded on your device instead, which takes longer. When our server writes the AVIF, it limits the longest side of the picture to 4,096 pixels, so a larger image is scaled down. It also drops one edge row or column of pixels when a side has an odd number, so the file opens on more phones. Neither change is visible on an ordinary web image. A batch is limited to 10 files, because AVIF takes longer to encode than the other formats. Split a larger set into rounds, and convert the heaviest images first.
Where AVIF still fails after the conversion
A site that serves AVIF is only as safe as the tools that touch the file afterwards. On some Windows PCs, Photos and File Explorer show AVIF files only after an extra codec from the Microsoft Store is installed. Older Photoshop versions cannot open AVIF. Some content systems, plugins and upload forms still check files against a list that predates it, and print services usually want JPEG. Before you replace a whole library, upload one converted file through every step it will pass through, and see what comes out, including what the receiving tool does to the file. One test file finds a broken step before a thousand files hit it.
A practical way to migrate a WebP library
Start with the images that cost the most, such as hero images and the largest gallery pictures. Convert them in batches of up to 10 files and download each batch as one file. Open a few at full size and compare them with the WebP originals, looking at faces, text and smooth gradients first. Then add the AVIF to the page with the WebP as a fallback in a picture element, so each visitor's browser takes the first format it can read. Measure the load time before and after on your own pages, and keep the originals in a separate folder in case you change your mind. Move on to the rest of the library only when you are happy with the first results.