Support

Find answers, guides, and tutorials to supercharge your content delivery.

What You Need to Know About FLIF: Free Lossless Image Format

Updated on November 21, 2018
What You Need to Know About FLIF: Free Lossless Image Format

FLIF, or Free Lossless Image Format, is a new image format which has proven to show exceptional compression results. This free image compression algorithm can render a file between 14 and 74 percent smaller than other image formats without decreasing the quality of the image. Free Lossless Image Format has outperformed other popular image compression algorithms, including WebP, lossless BPG, PNG, JPEG 2000, and JPEG XR.

Source: flif.info

Although still in the infancy stage, FLIF shows great promise for delivering compressed images while maintaining high quality.

What is FLIF?

As mentioned above, the free lossless image format is an algorithm that compresses a set of data that makes up an image more effectively than other operations. As a result, a FLIF image is smaller in size than a PNG or JPEG image. The FLIF algorithm employs a process called lossless compression, which ensures there is no loss in image quality. Learn more about the difference between lossy vs lossless compression.

FLIF is an excellent algorithm to compress all types of images, from webcomics to photographs and everything in between. Free Lossless Image Format helps a website visitor save time from loading large images thus reducing bounce rate for the website owner. From an interview with the FLIF creator, the goal is to more easily streamline images by becoming the "universal image format that just works".

How does FLIF work?

FLIF utilizes a type of arithmetic coding called Meta-Adaptive Near-zero Integer Arithmetic Coding (MANIAC). This method of coding is commonly employed for lossless compression. Arithmetic coding encodes a long message of many characters into a single number. When a Free Lossless Image Formatted file is uncompressed, all of the characters are completely restored.

Free Lossless Image Format supports progressive interlacing, meaning that it creates an image all at once. Downloading the first part of the file allows you to see the whole image. In contrast, some other types of file formats are non-progressive. A non-progressive image is broken into rows and columns that are then re-assembled on a screen. A progressive image is usually preferred over the interlaced format because the former will allow you to see a preview of the image quickly. If the image is saved in a non-progressive format, you cannot see a preview of the image until your device has downloaded the entire image.

Comparison to other image formats

According to Cloudinary, an image and video management company, the Free Lossless Image Format outperforms the optimized PNG format by about 31 percent. FLIF's creators created four different tests. These assess the format's performance in lossless compression, lossy compression, progressive decoding, and responsive images. The following outlines what the final lossless compression size of each image format ended up being.

Image formatImage size (in bytes)
Uncompressed RGBA10,293,932
PNG with Adam7 interlacing693,075
PNG with Adam7 interlacing after brute-force pngcrush657,022
JPEG 2000 (lossless)562,214
Uriginal PNG file as found on pngimg.com533,004
PNG, after brute-force pngcrush495,625
PNG, using PNGOUT447,419
BPG (lossless)334,889
WebP (lossless)328,650
FLIF299,643
FLIF without interlacing282,655

In the above comparison table, the Free Lossless Image Format is the clear winner, however WebP isn't too far behind.

Advantages and disadvantages of FLIF

FLIF outperforms many other types of image formats when it comes to relative size and quality. It is a good tool for archival purposes, editing, and exchanging original images. The creators are working to provide native web browser support as well as support for the software in popular image tools and viewers. As for advantages vs disadvantages to using the Free Lossless Image Format, consider the following.

Advantages

  • Smallest file size when compared to other popular image formats.
  • Uses progressive images, therefore the first piece of the file provides a good preview of the entire image.
  • Supports animation
  • Works well on any kind of image (e.g. line art, photographs, etc).

Disadvantages

  • Currently, there is no browser support for FLIF. There is a polyfill solution you can implement however, it is mainly for testing purposes.
  • FLIF is still experimental because it is a work in progress. If you are using it to encode files, be aware that a newer version may not be able to decode them.
  • There is currently no FLIF support in popular image editing tools / viewers.

The Free Lossless Image Format is definitely a step in the right direction for image compression. If you'd like to play around with FLIF a little, consider checking out the source code as well as the FLIF GUI.

Supercharge your content delivery 🚀

Try KeyCDN with a free 14 day trial, no credit card required.

Get started
KeyCDN uses cookies to make its website easier to use. Learn more