Google has introduced a new open-source JPEG coding library, Jpegli. According to the company, the new library can offer advanced features and a 35% compression ratio improvement at high-quality settings.

The idea to create a new coding library came from website optimization, which, according to Google, is one of the main problems with image coding. To speed up website loading times, images on websites should be smaller but not lose quality.

The company promises a significant improvement in the format, but the encoding library is also highly backward compatible. Jpegli provides both a fully interoperable encoder and decoder that conforms to the original JPEG standard and its most common 8-bit formalism, as well as API/ABI compatibility with libjpeg-turbo and MozJPEG.

Google also claims that images that are compressed or decompressed with Jpegli will retain more detail and be in better quality than regular JPEGs, while being smaller.

The blog post explains that Jpegli uses a number of new methods to reduce noise and improve image quality: adaptive quantization heuristics from the JPEG XL reference implementation, improved quantization matrix selection, accurate calculation of intermediate results, and the ability to use an advanced color space

The company also said that by improving image quality/compression density, Jpegli’s encoding speed is comparable to traditional approaches such as libjpeg-turbo and MozJPEG. According to the company, this means that web developers can easily integrate the new library into their workflows without sacrificing encoding speed or memory usage.

You can read all the details on Google’s blog and on the library’s GitHub page.