How to convert JPG, PNG, WebP, HEIC and GIF to AVIF

How much smaller AVIF makes each format, measured on real photos, what to watch for, and when to keep a JPG or PNG instead.

· 4 min read

AVIF is the smallest widely supported image format: every current version of Chrome, Edge, Firefox and Safari shows it. Converting your images to AVIF is one of the quickest ways to make a website lighter. Here is how much it saves from each format, what to watch for, and when to keep a JPG or PNG instead.

How much smaller AVIF is

We converted six 2400 × 1600 photos of landscapes, animals and food with Graviton’s converters, at their default AVIF quality of 75:

The file you start withAVIF is smaller byMedian
JPG saved at quality 9040–85%61%
WebP saved at quality 8226–64%50%
PNG photo94–99%97%

For comparison, the same JPGs converted to WebP shrank by 13–54%, a median of 29%. Smooth photos, like a misty landscape, shrink the most; detailed, noisy ones the least. Your own images will differ, so compare the before and after for each one.

Converting from each format

JPG to AVIF

The most common case: photos for a website or a store. Start from the largest JPG you have, ideally the camera’s or editor’s export, not one a website already compressed, since every lossy save loses a little detail. Use JPG to AVIF.

PNG to AVIF

PNG is lossless, so photos saved as PNG are huge, and AVIF cuts them the most. AVIF keeps transparency, so logos and cut-out product shots keep their transparent background. For screenshots full of small text, compare the result with Compress PNG, which keeps the PNG format. Use PNG to AVIF.

WebP to AVIF

If your site already serves WebP, AVIF usually halves it again. When an image comes out larger, keep the WebP. Use WebP to AVIF.

HEIC to AVIF

HEIC and AVIF keep images in the same HEIF container, with different codecs: HEIC uses HEVC, which only Safari shows on the web, and AVIF uses the royalty-free AV1, which every current browser shows. HDR iPhone photos keep their HDR in the AVIF while Keep HDR is on. Use HEIC to AVIF.

GIF to AVIF

A GIF holds at most 256 colours, which makes photos large and banded. As AVIF, the photo GIFs we tried shrank by 78–93%. Graviton converts the first frame only, so use it for still GIFs. To keep an animation, use Compress GIF instead. Use GIF to AVIF.

JPG to AVIF converterTurn JPG photos into AVIF images that are often half the size at the same visual quality. Converted in seconds.

What to watch for

  • Encoding takes longer. AVIF takes more work to encode than JPG or WebP, so a large photo can take a few seconds. Graviton uses every core of your processor, and the wait happens once, on your device.
  • Not every app opens AVIF. Browsers do, but some photo viewers, editors, email clients and upload forms don’t. Keep the original, and send JPGs where you’re not sure. AVIF to JPG turns an AVIF back when you need to.
  • Use a fallback on older sites. A website can offer AVIF with a JPG or WebP fallback in a <picture> element, so the few browsers without AVIF still get an image.

Converting with Graviton

  1. Open the converter for your format and drop in your images or a whole folder, up to 250 at a time.
  2. Compare the before and after, and change the quality or set an exact file size if you like.
  3. Download the AVIFs one by one or as a ZIP that keeps your folders: 3 a day on Free, unlimited on Pro.

Everything runs in your browser, so your images are never uploaded. Location and camera details are removed by default; pick what to keep under Keep metadata in More options.