How to Convert PNG to AVIF for Smaller Web Images
How to test AVIF on one important image, serve it with a fallback and avoid the usual mistakes.
AVIF is one of the newest image formats for the web. In published comparisons it often produces smaller files than JPEG and WebP at similar quality, though results vary from picture to picture.
Why choose AVIF?
- Strong compression: files are often much smaller than a JPEG or PNG of the same picture.
- Full alpha transparency: Retains clean transparent backgrounds for icons and product overlays.
- High dynamic range and wide color gamut support for vibrant imagery.
- Broad modern browser support across current editions of Chrome, Safari, Firefox, and Edge.
How to convert your images
- Choose your PNG images.
- Drop them into the PNG to AVIF converter.
- Press Convert and wait. Encoding takes a few seconds per image.
- Download the AVIF files.
Smaller images help pages load faster, especially on mobile connections.
Worked example: one large hero image
The biggest saving on most pages comes from the biggest picture, so start with a single test, not with the whole media library.
- Take the large image at the top of your home page as a PNG, resized to the width at which it is displayed.
- Convert it to AVIF at quality 60. Note the time it takes and the new size.
- Convert the same PNG to WebP at quality 80 for comparison.
- Open the original and both results side by side at full size. Look at smooth areas such as sky and at fine detail such as hair or text.
- Choose the smallest file that you cannot tell apart from the original at normal viewing distance.
- Publish it with a fallback, as described below, and keep the PNG.
Serving AVIF safely
HTML has a picture element made for this situation. You list the AVIF file first, a WebP or PNG second, and a normal image tag last. Each browser takes the first format it understands, so older browsers quietly get the fallback and nobody sees a broken image. Many content systems and image plugins write this markup for you. If yours accepts only one file per image, WebP is the more practical single choice.
Common mistakes
- Converting hundreds of images in a browser tab. AVIF encoding is slow. For bulk work, a build tool or an image service is the right approach. This converter suits a handful of important pictures.
- Publishing AVIF without a fallback.
- Pushing the quality very low. AVIF hides its loss well in a small preview, but fine textures turn smooth and waxy. Check at full size.
- Using AVIF for images people will download, such as a logo pack or a wallpaper.
- Judging by file size alone, without looking at the picture.
Troubleshooting
- Conversion fails on a large image: resize it first. Encoding needs far more memory than the size of the file suggests.
- The upload is rejected by your site: the system may not allow the AVIF file type. Check its settings or documentation.
- The image does not appear for some visitors: they are using an older browser and no fallback was provided.
When AVIF is not worth it
For small pictures, the difference between AVIF and WebP is a few kilobytes and not worth the extra handling. For a site with few visitors and few images, time is better spent on resizing pictures correctly. AVIF pays off on image heavy pages that receive real traffic.