{"id":"image-flif","mimeType":"image/flif","name":"Free Lossless Image Format","shortName":"FLIF","category":"Legacy \u0026 Archival","extensions":[".flif"],"description":"The Free Lossless Image Format (FLIF) is a novel, open-source lossless image format created in 2015. Utilizing MANIAC (Meta-Adaptive Near-zero Integer Arithmetic Coding), FLIF consistently outperformed PNG, lossless WebP, and lossless BPG in compression ratios. It is especially famous for its responsive progressive decoding, allowing an image to be viewed in low quality after downloading only a tiny fraction of the file. Despite its technical brilliance, FLIF development was officially halted in 2020 as its core concepts and developers transitioned to creating the new JPEG XL standard.","seo":{"title":"image/flif MIME Type | Complete Developer Reference","description":"Complete reference for the image/flif MIME type: magic bytes, MANIAC compression algorithm, HTTP headers, developer snippets, and its transition to JPEG XL.","faqs":[{"question":"What is the difference between FLIF and PNG?","answer":"FLIF offers significantly better lossless compression than PNG (often 30-50% smaller) and features an advanced progressive decoding method that makes images look recognizable almost instantly over slow connections. However, PNG is universally supported, whereas FLIF has been deprecated and lacks web browser support."},{"question":"Why was the FLIF format discontinued?","answer":"FLIF was discontinued because its lead developers joined the Joint Photographic Experts Group (JPEG) committee to help design a new, next-generation universal format: JPEG XL (.jxl). JPEG XL incorporates the best parts of FLIF (like the responsive progressive loading) while adding lossy compression and broader industry support."},{"question":"Can I use FLIF files on a website?","answer":"No modern web browsers natively support FLIF. While JavaScript/WebAssembly polyfills exist (like poly-flif), they are computationally expensive. Developers should use WebP, AVIF, or JPEG XL instead."}]},"index":{"compression":["Lossless (MANIAC Entropy Coding)"],"browserSupport":{"score":1,"label":"None"},"commonUses":["Archival of Uncompressed Image Assets","Bandwidth-Constrained Progressive Image Loading (Historical)","Medical and Scientific Imaging Storage"]},"technical":{"magicBytes":{"hex":"46 4C 49 46","ascii":"FLIF"},"container":"FLIF Bitstream","compressionAlgorithm":["MANIAC (Meta-Adaptive Near-zero Integer Arithmetic Coding)"],"colorDepth":["1-bit to 16-bit (Per Channel)","Grayscale, RGB, RGBA, CMYK"],"transparency":true,"animation":true,"metadata":{"exif":true,"xmp":true,"iccProfile":true},"alphaChannel":true,"progressiveLoading":true,"hdrSupport":true},"history":{"developer":"Jon Sneyers and Pieter Wuille (Cloudinary)","released":"2015","specification":"Obsolete (Superseded by JPEG XL)"},"browserSupport":{"chrome":false,"chromeVersion":"None","firefox":false,"firefoxVersion":"None","safari":false,"safariVersion":"None","edge":false,"edgeVersion":"None","internetExplorer":false},"softwareSupport":[{"name":"ImageMagick","logo":"image-magic.webp"},{"name":"ExifTool","logo":""},{"name":"XnView","logo":""},{"name":"FLIF Reference Codec (UGUI)","logo":""}],"conversion":{"convertTo":["png","jxl","webp","tiff"],"convertFrom":["png","tiff","pnm"]},"developer":{"httpHeaders":[{"header":"Content-Type","value":"image/flif"}],"htmlAccept":"image/flif, .flif","fileDetection":["Check the first 4 bytes for the ASCII string 'FLIF' (Hex: 46 4C 49 46)","The 5th byte indicates the color format and depth (e.g., Grayscale vs RGBA)"]},"prosCons":{"pros":["Achieves some of the highest lossless compression ratios ever developed for raster images","Incredible progressive decoding allows an image to be highly recognizable even after only 5% of the file has been downloaded","Supports animations and complex alpha channels losslessly"],"cons":["Officially abandoned in favor of JPEG XL","Zero native support in web browsers or standard operating system previewers","Encoding speed can be significantly slower than standard PNG or WebP compression"]},"specifications":{"url":"https://flif.info/","rfc":"","mimeAliases":["image/x-flif"]},"developerSnippets":{"python":"import magic\n# Libmagic will identify FLIF files via their magic byte header\nprint(magic.from_file('archive.flif', mime=True)) # Outputs 'image/flif'","nodejs":"const FileType = require('file-type');\nconst type = await FileType.fromFile('archive.flif');\nconsole.log(type?.mime); // Outputs 'image/flif'","go":"import (\n    \"bytes\"\n    \"net/http\"\n)\n// Standard http.DetectContentType will not recognize FLIF and returns application/octet-stream.\n// Custom detection:\n// isFLIF := bytes.HasPrefix(buf, []byte(\"FLIF\"))","php":"$mime = mime_content_type('archive.flif');\necho $mime; // Standard setups may output 'application/octet-stream' depending on the server's magic database"},"relatedFormats":["jxl","png","webp","tiff"]}
