AVIF Explained: What It Is and Whether You Should Use It (vs WebP and JPG)

Featured Image: AVIF Explained: What It Is and Whether You Should Use It (vs WebP and JPG)

AVIF is the newest image format to go mainstream on the web, and it promises smaller files than JPG and WebP at the same visual quality. But it also has trade-offs that rarely make the headlines: slower encoding, patchy support in editing software, and a few cases where WebP still wins. Here’s what AVIF actually is, how it compares, and when it’s worth using.

๐Ÿ’ก

Want to try it yourself? Compress your images free โ€” no upload, no signup.

AVIF Explained: What Is an AVIF File?

An AVIF file (file extension .avif) is an image saved in the AVIF format, short for AV1 Image File Format. It is built on the AV1 video codec and developed by the Alliance for Open Media. The format is open and royalty-free, and it is designed to deliver high image quality at very small file sizes, which is why websites increasingly use it.

AVIF supports:

  • Lossy and lossless compression
  • Transparency (an alpha channel, like PNG and WebP)
  • Animation, though tooling for animated AVIF is less mature than for GIF or WebP
  • HDR and wide color gamuts, with 8-bit, 10-bit and 12-bit color depth. That means brighter highlights, deeper shadows, and a wider range of colors than JPG can handle.

If you want the background on lossy and lossless compression, see our guide to lossy vs lossless compression.

Is AVIF Better Than JPG?

For web use, usually yes. At comparable visual quality, AVIF files are commonly cited as being up to around 50% smaller than JPG and roughly 20-30% smaller than WebP. AVIF also tends to preserve fine detail and reduce the blocky compression artifacts that JPG shows at low quality.

Treat those numbers as a rough guide rather than a guarantee. In one vendor test on a small set of images, AVIF came out roughly 15-48% smaller than JPG and 14-41% smaller than WebP, and results depend heavily on the image, the encoder and the quality setting you choose.

JPG still wins on compatibility. It opens everywhere, from old phones to printing kiosks, while AVIF can still be rejected by older software and upload forms.

The picture changes for lossless compression. In the same test, WebP’s lossless files were smaller than AVIF’s. So AVIF’s advantage is mostly in lossy compression, which covers the majority of photos on the web.

AVIF vs WebP vs JPG at a Glance

JPGWebPAVIF
File size (lossy photos)BaselineSmaller than JPGUsually the smallest
TransparencyNoYesYes
AnimationNoYesYes (limited tooling)
HDR / wide gamutLimitedLimitedYes
Encoding speedFastFastSlower
Browser supportUniversalUniversal in modern browsersAll major modern browsers
Editor and app supportUniversalGoodStill patchy

Browser Support

All major modern browsers now support AVIF: Chrome added it in 2020, Firefox in 2021 and Safari in 2023. That covers the vast majority of visitors today, but not everyone, since some older browsers and devices don’t support it. The safe approach is to serve AVIF with a fallback, covered below.

How to Open an AVIF File

  • In a browser: drag the file into a Chrome, Firefox, Edge or Safari window. This is the simplest way on any computer.
  • On your phone: recent versions of Android and iOS can open AVIF files in their gallery and browsers.
  • On Windows and Mac: recent versions can open AVIF files, though on Windows you may need to install the AV1 Video Extension from the Microsoft Store for the Photos app to show them. Some older image viewers and editors can’t open AVIF at all.
  • If nothing opens it: convert the file to JPG or PNG, as described in the FAQ below.

The Downsides of AVIF

  • Slower encoding. Creating AVIF files takes more processing power than WebP or JPG. On a server that converts images once and caches them this barely matters, but it can slow down build steps or low-powered devices.
  • Patchy software support. Many older image editors, email clients, social platforms and upload forms still don’t accept AVIF. If you need to upload an AVIF file somewhere that rejects it, you will have to convert it to JPG or PNG first.
  • Not always better. For lossless images, small graphics and animations, WebP or another format can be the better choice.

How to Use AVIF on a Website Safely

The standard approach is the HTML <picture> element, which lets the browser pick the first format it supports:

<picture>
  <source srcset="photo.avif" type="image/avif">
  <source srcset="photo.webp" type="image/webp">
  <img src="photo.jpg" alt="Description of the photo" width="1200" height="800">
</picture>

Browsers that understand AVIF use it, browsers that only understand WebP get that, and everything else falls back to the JPG. Combine this with responsive sizes, as explained in our responsive images and srcset guide.

On WordPress: since version 6.5, you can upload AVIF files to the Media Library, and WordPress generates thumbnails for them. That requires a recent PHP version and an image library (GD or Imagick) built with AVIF support, which most modern hosts provide but some shared hosts do not. Performance and image plugins, including LiteSpeed Cache’s image optimization, can convert uploads to AVIF and fall back to WebP or the original.

So Should You Use AVIF?

  • Yes, if you run a website with lots of photos and can serve AVIF with a WebP or JPG fallback. The file size savings help your Core Web Vitals.
  • Stick with WebP if you need lossless output, animation, fast encoding, or the simplest possible setup.
  • Use JPG or PNG when you are sending files to people, apps or upload forms that may not understand newer formats.

For a broader comparison of the everyday formats, see JPG vs PNG vs WebP.

Frequently Asked Questions

Is AVIF better than WebP?

For lossy photos, AVIF usually produces smaller files at similar quality. WebP encodes faster, is supported by more software, and is often smaller for lossless images. Neither is better in every case.

Does AVIF support transparency?

Yes. Like PNG and WebP, AVIF supports an alpha channel, so it can replace PNG for transparent images. For a comparison, see PNG vs WebP for transparent backgrounds.

How do I read or open an AVIF file?

The easiest way is to drag it into a modern web browser. Recent versions of Windows, macOS, Android, and iOS can also open it, though some older apps and editors can’t. If a program rejects an AVIF file, converting it to JPG or PNG solves it.

Are AVIF files safe?

Yes. AVIF is an ordinary image format, and AVIF files are no more dangerous than JPG or PNG files. As with any file from an unknown source, keep your browser and operating system up to date, since image-handling bugs are fixed through updates.

Should I convert all my website images to AVIF?

Not all at once, and not without a fallback. Convert your largest and most important photos first, serve AVIF with a WebP or JPG fallback, and check the results before converting everything.

Can I convert AVIF to JPEG?

Yes. Drag the file into a browser-based tool. Ours opens AVIF files and exports them as JPG, and everything happens on your device, so nothing is uploaded. Converting to JPG makes the file compatible with almost any app or upload form, though it may be somewhat larger.

Need to open an AVIF file or convert it to JPG? Use our free browser-based tool โ€” no upload required; everything happens on your device.

Ready to shrink your images?

Compress and resize JPG, PNG, and WebP files for free, right in your browser. No uploads, no signups, no waiting.

Compress Images Now โ†’
Scroll to Top