‹ All guides

WebP vs AVIF: which image format should you use?

JPG and PNG have been around for decades, and both are showing their age. WebP and AVIF are the two modern formats built to replace them, and both can make the same photo dramatically smaller. The question is which one to use — and the honest answer is that it depends on where the image will be seen.

What WebP is

WebP was developed by Google and released in 2010 as a format built specifically for the web. It compresses photos more efficiently than JPG, supports transparency like PNG, and can even handle animation like a GIF. A photo saved as WebP is typically 25 to 35% smaller than the same photo saved as JPG at similar visible quality, which is why it has become the default image format for many websites and blogs.

WebP's biggest strength is support. It works in all modern browsers — Chrome, Firefox, Safari, and Edge — and in most phones, image editors, and content management systems. When you save a WebP file today, you can be fairly confident that the person or device on the other end will be able to open it. That is not something you can say about every newer format.

What AVIF is

AVIF is newer. It is based on the AV1 video codec, and it was designed to squeeze images even smaller than WebP. In practice, an AVIF file is often 20 to 30% smaller than the same image saved as WebP at the same visible quality, and the advantage is biggest on detailed photos and images with smooth gradients, like skies and skin tones, where AVIF avoids the banding that other formats can show.

AVIF also supports transparency, wide colour, and high dynamic range, which makes it attractive for high-end photography and for images that need to look their best on modern screens. It is a technically stronger format than WebP in almost every measurement of quality per kilobyte.

The catch is support. AVIF works in current versions of Chrome, Firefox, Edge, and Safari (from version 16 onwards), which covers most people browsing the web today. But older browsers, older phones, and many desktop apps — including some popular image editors and office software — still cannot open AVIF files. If you send an AVIF image to someone with an older device, they may see nothing at all.

File size: a real example

Numbers make the difference concrete. Take a typical phone photo, 4000 by 3000 pixels, saved at a quality setting that looks clean on screen. As a JPG at 80% quality, it might be around 1.5 MB. Saved as WebP at the same visible quality, it would typically come in at around 1 MB. Saved as AVIF, it would often be around 700 to 800 KB. Each step saves roughly a quarter to a third of the file size, and the photo still looks the same to the eye.

Those savings matter most on websites, where every kilobyte affects loading speed. A page with ten photos could drop from 15 MB of JPGs to 10 MB of WebP, or 7 MB of AVIF. On a slow mobile connection, that is the difference between a page that loads in two seconds and one that takes eight. For a single photo sent in a chat, the difference matters far less, because the file is already small.

One warning, though: these are typical figures, not guarantees. The exact savings depend on the photo. A busy, detailed photo compresses less well in every format, while a simple photo with large areas of flat colour can shrink dramatically. The only way to know for sure is to convert your own image and compare the file sizes.

Browser and app support

Support is where the two formats part ways. WebP is supported by essentially every browser in use today, and by most image tools, social platforms, and website builders. It is the safe choice when you do not control who will open the file.

AVIF support is good in browsers but patchy everywhere else. Many email clients cannot display AVIF images inline. Some messaging apps will not preview them. Older versions of popular photo editors cannot open them, and some content management systems will refuse to upload them. If you use AVIF, you need to be sure about where the image is going — a modern website with a fallback is fine, but an email attachment or a file you send to a client is risky.

A good rule is to check the destination before choosing. If the image will live on your own website, where you control the code and can offer a JPG fallback, AVIF is worth using. If the image will be downloaded, emailed, or opened in software you do not control, WebP is the safer bet.

When to use WebP

  • Website and blog images. WebP is the best default for the web: small files, wide support, and no compatibility worries.
  • Images you share with other people. If someone else will open the file, WebP is far more likely to work on their device than AVIF.
  • Social media and messaging. Most platforms accept WebP, and where they do not, they usually convert it for you.
  • Anything that needs transparency. WebP handles transparent backgrounds with much smaller files than PNG.
  • When you want one format and no fallback. WebP works well enough everywhere that you often do not need a second version of the image.

When to use AVIF

  • Your own website with a fallback. Serve AVIF to browsers that support it and fall back to WebP or JPG for the rest. You get the smallest files where they work and compatibility where they do not.
  • High-quality photography. For hero images, portfolios, and photos where quality matters, AVIF keeps fine detail and smooth gradients better at small file sizes.
  • Images with large smooth areas. Skies, studio backgrounds, and gradients are where AVIF's advantage over WebP is most visible.
  • When file size is the top priority. If you are optimising a page for speed and every kilobyte counts, AVIF is the smallest option available.

What about JPG and PNG?

Neither WebP nor AVIF makes JPG and PNG useless. JPG is still the most compatible format in existence — every device, app, and printer made in the last twenty years can open a JPG. For email attachments, files you send to clients, and anything where compatibility matters more than size, JPG is still the right choice.

PNG is still the right choice for images that must be pixel-perfect: logos, screenshots with text, diagrams, and anything with sharp edges and flat colours. WebP and AVIF are lossy formats by default, which means they throw away some detail, and that can soften sharp edges. PNG keeps every pixel exactly, at the cost of a much larger file.

A sensible approach is to keep a JPG or PNG as your master copy, and export WebP or AVIF versions for the web. That way you always have a compatible original, and you get the speed benefits of the modern formats where they count.

How to convert

Converting is straightforward. Open the Image Converter, add your JPG or PNG, choose WebP as the output format, and set the quality to around 80%. Download the result and compare it with the original: check the file size, then zoom in and look at faces, text, and edges. If it looks clean, you are done. The file is processed in your browser, so nothing is uploaded.

For AVIF, the process is the same where your tools support it, but check the result on the device or browser where it will be used. If you are putting the image on a website, test the page in an older browser or an older phone to make sure the fallback works. And whatever format you choose, keep the original file — converting back from WebP or AVIF to JPG will not restore the detail that was removed.

Common mistakes to avoid

  • Using AVIF where it will not open. Sending an AVIF file by email or to a client is a gamble. When in doubt, use WebP or JPG.
  • Converting a JPG to AVIF and expecting a miracle. If the original JPG is already heavily compressed, converting it to a newer format cannot bring back lost detail. Convert from the best original you have.
  • Setting the quality too low. At 50% quality, even AVIF will look bad. Stay at 75 to 85% for photos, and compare the result with the original before publishing.
  • Forgetting a fallback on your website. If you serve AVIF without a WebP or JPG fallback, visitors on older browsers will see a broken image. Always provide one.

Related guides

What is WebP and should you use it? →

JPG, PNG, or WebP? Which should you use? →

How to compress photos for the web →

Frequently asked questions

Is AVIF better than WebP? In pure compression, yes — AVIF usually produces a smaller file at the same visible quality, often 20 to 30% smaller than WebP. But WebP has much wider support in apps and older devices, so for most people WebP is the more practical choice today.

Can I convert WebP to AVIF? Yes, but there is little point if the WebP is already compressed, because the detail lost in the first conversion cannot come back. Convert from the original JPG or PNG when you can.

Do phones support AVIF? Most modern phones do — recent versions of Android and iOS can display AVIF images. Older phones may not, so check before sending an AVIF file to someone directly.

Which format should I use for my website? WebP is the best default for most websites: small files and near-universal support. Add AVIF with a WebP or JPG fallback if you want the smallest possible files and are comfortable managing two versions of each image.

Open the Image Converter