Image file formats
2018-10-16 — 2025-06-11
Wherein modern web image formats are surveyed, browser support and historic security flaws are recounted, and AVIF conversion of high‑res TIFFs yielding roughly 75% file‑size reductions is noted.
Modern image formats — for my reference, with particular attention to those that are good for the web. There are many guides on this; see, for example, avif.io. I wrote these notes for my own reference.
Note that, despite the apparently benign act of taking a file’s pixels and putting them on a screen, image libraries have a long history of security bugs, including disastrous ones.
1 WebP
The WebP image format is supported on most modern browsers. Notably, non-browser apps are a bit crap at WebP, so chat programs and feed readers fail to create thumbnails for websites using WebP. They’ll probably only support GIF89a until the end of time. That’s why the page previews for this site sometimes look a bit crap; I use WebP quite a lot.
Famous WebP security vulnerability: CVE-2023-4863; tl;dr: all software using WebP before 2023-09-14 was vulnerable to remote code execution.
2 AVIF
The most futuristic image format with reasonable support — i.e. 90%+ of browsers. It will even work in Microsoft Edge in the next version, supposedly. It was briefly going to be in Microsoft Edge, but they seem to have changed their minds. It works everywhere. Like WebP, many non-browser apps are poor at AVIF, so some websites fail to render AVIF thumbnails. That won’t stop me from using it. I’m not being paid to work around the deficiencies of other people’s software.
After much experimentation, I’m switching the etching and engraving artwork on this blog to AVIF; it looks much nicer and has a much smaller file size.
3 JPEG2000
4 JPEG XL
5 Even fringier options
bpg…
Something in my heart yearns to develop AI image codecs.
6 Previewing in macOS
See macOS image preview.
7 Bonus: mass conversion
I like to convert my ultra-high-res TIFFs to still-very-large-but-manageable AVIFs with minimal loss of quality but a huge reduction (75%+) in file size: