Lossy compression is supported by the AVIF format, allowing you to reduce the size of files significantly. Encoding lossy compression results in some loss of data, reducing the quality of an image. However, you can specify the amount of loss you are willing to accept with the AVIF format.
The AVIF format is a new image format developed by the Alliance for Open Media (AOMedia). It is designed to be a more advanced and efficient alternative to popular image formats such as JPEG and PNG. One of the key features of AVIF is that it supports a wide range of bit depths, from 8 to 12 bits per channel, and a wide range of color spaces, including Rec 2020, Pro Photo RGB, and sRGB. It also supports three types of chroma subsampling: 4:2:0, 4:2:2, and 4:4:4.
AVIF can be used in both lossless and lossy modes, allowing users to balance the tradeoff between image quality and file size. In lossy mode, AVIF can achieve significantly smaller file sizes than other formats, such as JPEG and WebP, while still maintaining good image quality. However, encoding and creating AVIF images can be slower than other formats, which may be a problem for sites that generate images dynamically.
AVIF also supports the use of layers, which can be used to increase the quality or resolution of an image based on one or more previous layers, or to provide the image independently. AVIF decoding speed is generally good and is likely to improve in the future, although the format may require more CPU power to display images than other codecs. Support for AVIF is currently available in about 70% of current browsers, but not all programs support it.