An AVIF file is an image saved in the AV1 Image File Format, a royalty-free format from the Alliance for Open Media that uses the compression of the AV1 video codec to store still images. It makes photos much smaller than JPEG at the same visible quality, often smaller than WebP too, and supports transparency, HDR colour and animation, with the .avif extension. You meet AVIF files mostly on websites, which use them to load faster, and when you save an image from a page. This guide explains what the format is, how to open and convert AVIF files, browser support, and when AVIF is the right choice. It is part of our guide to image optimization for the web.
Quick answer
- What it is: AV1 Image File Format,
.avif, MIME typeimage/avif. Version 1.0 of the specification was published in 2019. - Opening it: current Chrome, Edge, Firefox and Safari open AVIF. So do Preview on macOS 13 Ventura and later, Photos on iOS 16 and later, and the Windows Photos app with Microsoft's free AV1 Video Extension.
- Converting it: open it in a browser-based converter such as the getReport image compressor and save as JPEG or WebP, or use Preview → Export on a Mac.
- Why sites use it: photos as AVIF are often noticeably smaller than WebP and much smaller than JPEG at the same visible quality.
- The catch: encoding is slow, and some older apps, email clients and upload forms still refuse AVIF.
What is AVIF?
AVIF stands for AV1 Image File Format. It was developed by the Alliance for Open Media, the industry group behind the AV1 video codec, whose members include Google, Apple, Microsoft, Mozilla, Netflix and Amazon. Version 1.0.0 of the specification was published in February 2019.
The idea is simple: modern video codecs are very good at compressing a single frame, so AVIF takes one frame (or a sequence of frames) compressed with AV1 and stores it in the HEIF container, the same container Apple uses for HEIC photos. Because AV1 is royalty-free, anyone can build AVIF support without paying licence fees.
| AVIF | |
|---|---|
| File extension | .avif |
| MIME type | image/avif |
| Compression | Lossy or lossless |
| Transparency | Yes |
| Animation | Yes, as image sequences |
| Colour depth | 8, 10 or 12 bits per channel |
| HDR and wide colour | Yes |
| Container | HEIF (ISO/IEC 23008-12) |
What AVIF does better than older formats:
- Smaller photos. At low and medium quality, AVIF keeps smooth gradients, skies and skin tones clean where JPEG breaks into blocks. The exact saving depends on the image; try it on a typical photo of your own.
- More colour. 10- and 12-bit colour and HDR mean smoother gradients and brighter highlights on screens that can show them.
- One format for everything raster: photos, graphics with transparency and animations.
AVIF vs HEIC
Both use the HEIF container, which is why they are often confused. HEIC stores images compressed with HEVC (H.265), the format iPhones use for photos by default, and HEVC is covered by patent licences. AVIF stores images compressed with AV1, which is royalty-free. That is why browsers adopted AVIF for the web while HEIC stayed mostly a camera format.
Why do images download as AVIF?
Because the website sent AVIF. Many sites and image CDNs serve AVIF to browsers that accept it, sometimes even when the address ends in .jpg, since the smaller file makes the page load faster. When you save the image, you get what the server sent. If the program you want to use it in cannot open AVIF, convert it.
How to open an AVIF file
- Web browsers: current versions of Chrome, Edge, Firefox and Safari display AVIF. Drag the file into a browser window to view it.
- Windows 10 and 11: the Photos app opens AVIF once the free AV1 Video Extension from the Microsoft Store is installed. Many Windows 11 computers already have it.
- Mac: Preview and Quick Look open AVIF on macOS 13 Ventura and later.
- iPhone and iPad: iOS and iPadOS 16 and later display AVIF.
- Android: Android 12 and later decode AVIF natively.
- Image editors: GIMP opens and exports AVIF since version 2.10.22. Support in other editors varies by version, so check yours before relying on it.
How to convert AVIF to JPG, PNG or WebP
In your browser:
The getReport image compressor decodes each image with your browser's own decoder, so it accepts AVIF files wherever your browser can display them, which is every current browser. Choose JPEG or WebP as the output and download the results one by one or as a zip, up to 50 at a time. Everything runs on your device; nothing is uploaded. JPEG gets a white background where the AVIF was transparent. The tool does not write PNG.
Mac, Preview: open the AVIF, then File → Export, and choose JPEG or PNG.
Command line: the libavif project's avifdec decodes to PNG or JPEG, and avifenc encodes:
# AVIF to PNG
avifdec photo.avif photo.png
# JPEG to AVIF at quality 55, speed 6
avifenc -q 55 -s 6 photo.jpg photo.avifImageMagick converts in either direction if it was built with HEIF support: magick photo.avif photo.jpg.
Converting AVIF to JPEG recompresses the image, so use a high JPEG quality (85 or more) if you want it to look the same, and expect the JPEG to be larger.
AVIF browser support
AVIF works in all current major browsers. It arrived later than WebP, which is why some older guides still call it experimental:
| Browser | AVIF support since |
|---|---|
| Chrome | Chrome 85 (August 2020) |
| Firefox | Firefox 93 (October 2021) |
| Safari | Safari 16 (2022), on iOS 16 and macOS 13 Ventura; Safari 16.4 added it on macOS 11 and 12 |
| Edge | Edge 121 (January 2024) |
Browsers from before those versions do not show AVIF, so sites that use it serve a fallback: the <picture> element lists AVIF first, then WebP, then JPEG, and each browser takes the first one it supports. Alternatively, the server chooses the format from the browser's Accept header. The guide to modern image formats: WebP, AVIF and when JPEG is still fine shows both setups and the quality settings to use.
Google Images indexes AVIF alongside JPEG, PNG, WebP and the other common formats, according to Google's image SEO documentation.
When to use AVIF on a website
AVIF pays off most on the images that matter most for speed:
- Hero images and product photos, especially the one at the top of the page, which is often the Largest Contentful Paint element.
- Large photos with gradients, such as skies, food and portraits, where AVIF avoids the banding and blocks that JPEG shows at small sizes.
- Sites with many photos, where the saving adds up across the catalogue.
WebP is often the more practical choice when:
- You encode many images on the fly or in a slow build. AVIF encoding is much slower than WebP; the getReport compressor, for example, takes several seconds per photo in AVIF.
- The image is small or already light. A 40 KB thumbnail gains a few kilobytes.
- The image is a screenshot or flat graphic, where lossless WebP or SVG is usually the better fit.
Many sites use both: AVIF first, WebP as the fallback, JPEG for the oldest browsers. Our explainer on what a WebP file is covers the other half of that pair.
To see which images on a page are still JPEG or PNG and how much a modern format would save:
Setting quality for AVIF
AVIF quality numbers are not on the same scale as JPEG or WebP. A quality around 50–65 in most encoders gives photos a look comparable to JPEG at 80, at a fraction of the size. Higher settings quickly produce files larger than you need. Compare the result at the size the image is displayed, looking at detailed areas such as hair or text, and use the lowest setting that still looks right. Our step-by-step guide on how to reduce image file size covers resizing first, which saves more than any format.
Common mistakes
- Renaming a JPEG to
.avif. The file stays a JPEG. Convert it with an encoder. - Serving AVIF without a fallback to a site whose visitors include old iPhones or older Edge versions. Use
<picture>or content negotiation. - Using AVIF for the Open Graph image. Link previews on several platforms expect JPEG or PNG.
- Sending AVIF files by email or to print shops. Many recipients cannot open them yet; send JPEG.
- Converting without resizing. A 5000-pixel AVIF is smaller than a 5000-pixel JPEG, and still far too large for an 800-pixel slot.
Questions people ask
What is an AVIF file used for?
An AVIF file is used mainly for images on websites, where its small size makes pages load faster. Sites serve photos, product images and hero banners as AVIF to browsers that support it. It also handles transparency, HDR and animation. For sending images to other people, printing or older software, JPEG or PNG is still more convenient.
Is AVIF better than JPEG?
For images on a website, usually yes. AVIF stores photos in far fewer bytes than JPEG at the same visible quality, keeps gradients smooth at small file sizes and adds transparency, HDR and animation. JPEG is better for compatibility: every program, printer and email client opens it. Use AVIF on your site with a fallback, and JPEG for files you share.
Why can't I open an AVIF file?
Your program or system is older than its AVIF support. Drag the file into a current browser to view it. On Windows, install the free AV1 Video Extension from the Microsoft Store; on a Mac, AVIF opens in Preview from macOS 13 Ventura on. To use the image in software that still refuses it, convert it to JPEG or PNG.
Is AVIF the same as HEIC?
No, though both use the same HEIF container. HEIC stores images compressed with HEVC, the default photo format on iPhones, which is covered by patent licences. AVIF uses AV1, which is royalty-free, and all major browsers display it. HEIC files are mostly camera photos; AVIF files are mostly web images.
Is AVIF lossless?
It can be. AVIF has both lossy and lossless modes, but almost every AVIF on the web is lossy, because that is where its savings are largest. For lossless images such as screenshots and graphics, lossless WebP or PNG usually gives smaller files and encodes faster, so AVIF's lossless mode is rarely the best choice.