AVIF comes to town

Posted: 5th Dec 2022

It has taken a while to get here, but AVIF auto conversion is now available for assets stored on the Servd Asset Platform.

Converting to AVIF has been supported for a while, but you had to explicitly request it by setting the 'format' of an image transform to 'avif'.

With the release of v2.8.0 and 3.2.0 of the Servd plugin there's a new option in the plugin settings called 'Image Format Autoconversion'. This allows you to change the way that auto conversion is handled, by either disabling it entirely (so the original source file format is always maintained), auto converting to WebP (the existing behaviour), or auto converting to AVIF with a WebP fallback if the client doesn't support AVIF.

You can experiment with this to determine which setting works best for your project's assets - images with thin lines and photos with gradients can render quite differently under different formats.

Keep in mind that AVIF encoding is MUCH slower than alternatives - this is a 'feature' of the codec itself. If you are working with large images you might find that this slowdown is unacceptable in which case we recommend sticking with WebP until AVIF encoding speeds improve.

Have fun, and let us know if you hit any snags!