You want the smallest possible image for your site, you read that AVIF is the future, you read somewhere else that WebP is the safe choice, and you leave the search more confused than you arrived. An AVIF vs WebP comparison is not a question of which format is better in the abstract, but of time and job: what the image is, where it is shown, and how often the site is rebuilt.
At the same visible quality, AVIF produces a file 20 to 50% smaller than WebP. Where in that range you land depends on content: images packed with fine detail and small type reach the high end, while skies and soft gradients sit closer to 20%.
In practice: a 100 KB WebP becomes 50 to 80 KB as AVIF. That matters if you serve millions of images a month, and matters almost not at all on a blog with thirty posts. The arithmetic becomes real on image-heavy pages: twenty files saving 40 KB each is 800 KB off a single page.
The awkward part is that the biggest gain shows on the images you care most about: product shots with real texture, and pictures with small type inside the design — which are also the ones where over-compression shows first, so your eye matters more there than anywhere.
Encoding time. AVIF is slower, and on older hardware it can take several times as long as WebP. Convert a hundred images in one batch on a modest laptop and you will feel it before you see the result.
Support is also narrower: every current browser opens AVIF, but older tools — some image editors, some Android apps, the admin panels of some platforms — still refuse it. WebP has been near-universal for years, and that alone is reason enough to keep it as the default.
There is a third cost that rarely gets mentioned: re-encoding. Every new conversion from one compressed format to another throws away a little more detail, so always convert from the original, never from the output.
The rule I apply: WebP is the safe default for every image on the site, and AVIF is a bonus for the large ones when size is a real priority. These cases cover most of what you will meet:
The short rule: start with WebP, and if size is the actual problem, try AVIF on your own image and compare with your eyes. Do not convert a file you already hold to chase a percentage on paper — conversion here saves bytes, not quality.