How AVIF Can Speed Up Your Site. (WORDPRESS or not)

  • Home
  • Blog
  • How AVIF Can Speed Up Your Site. (WORDPRESS or not)
How AVIF Can Speed Up Your Site. (WORDPRESS or not) Results

The AV1 Image format, or AVIF, is the latest image codec on earth. AVIF is an optimized image format which was created to make our images smaller while keeping the same quality (lossless).

In this article, I want to talk about its features and benefits, and why IMGHaste is using AVIF.

What is AVIF and How Does it Work?

AVIF is an extraction from the keyframes of the now popular video format AV1 developed by Alliance for Open Media (AOM).

AOM developed AVIF with the goal of providing royalty-free images with better compression efficiency and more feature support compared to the existing image formats.

AVIF now has backers from big companies like Google, Netflix, and Apple.

Why is AVIF Better?

Following its predecessors (WebPJPEG-XR and PNGGIF) AVIF is compatible with high-dynamic-range imaging. It supports 10- and 12-bit color at full resolution, resulting in images that are up to 10 times smaller than other known formats.

AVIF is a good choice for web developers because:

  • It is royalty-free, so you can use it for free without worrying about licensing.
  • Big players like Google, Amazon, Netflix, Microsoft is currently backing up AVIF
  • It has the most optimal compression.
  • It has more modern features packed in like transparency, HDR and more.

What are the Trade offs?

AVIF might look perfect to begin with, however there are some drawbacks.

Creating an AVIF (let’s say from a JPEG) requires a huge amount of time and its high CPU & Memory demanding.

So unless you keep a separated AVIF version of your images in your file system, creating an AVIF might take up to 3 seconds, even for high end CPUs.

So how to solve this? Nobody can wait 3 seconds for each image to load.

Luckily at imghaste we have come to a solution will take care this. It’s within our roadmap and will soon be implemented for all users, the ability to switch from 30 days (1 credit) caching time to 365 days caching TTL.

This will practically force the AVIFs to be created just once every year and this way you can warm up the CDN cache yourself.

Which browsers support AVIF

  • You can find live updates on AVIF Browser Support here
  • The first browser to fully support AVIF is Chrome 85.
  • Microsoft Windows 10 also added support in the “19H1” updates.
  • Mozilla is still working on the support for the image format in Firefox.

Wrapping Up

ImgHaste is using AVIF because is a game changer that will soon become the world’s defacto image format. Because of its potential features, it is likely that it will soon gain full support on all platforms.

Unlike Google’s WebP image, which took Apple a whole of 10 years to support, AVIF has quickly attracted Apple’s interest to the extent that they now contribute to the project.