We got some good news relatively recently — Apple has, perhaps somewhat surprisingly, finally announced support for the WebP format, making support more or less universal across modern browsers.

And that’s great, because WebP offers real file size advantages over JPEG, especially in its lossy format, leading to smaller network payloads and quicker page loads.

JPEG’s been around for quite a while now — since 1992, in fact, and its support is universal — basically anything with a screen can understand and display the JPEG format.

But other than WebP, a format capable of taking the place of both JPEG and PNG, browser-supported image formats have been remarkably unchanged for a very, very long time, despite a real need for versatile, more efficient formats. (Actually, this is true even outside of browsers.)

History is littered with JPEG standards which never really went anywhere, despite apparent expectations to the contrary. This has left us in the unfortunate position of not having much by way of choice: Chrome’s own Lighthouse tool, in the context of using “next-gen image formats”, mentions just three: WebP, JPEG 2000, and JPEG XR.

“Well, great,” says the new web developer. “I have options!”

Except that we don’t. JPEG 2000 was introduced 20 years ago (that ‘2000’ refers to the year it was released) and is supported solely by Safari. Even more inexplicably, JPEG-XR (was) supported by none other than Internet Explorer 9+ (and Edge 12–18), and nothing else. So neither JPEG 2000 nor JPEG-XR ever caught on, and JPEG-XR is literally dead.

So why does Google, in 2020, mention file formats with as much relevance as MC Hammer?*

One explanation might simply be that there really aren’t any other competing formats with any browser support whatsoever, and they’re in the uncomfortable position of either putting forward their own format as the only “next-gen” option, or to include other formats as well, even if they don’t make much sense.

*I was wrong. MC Hammer is 100% still relevant in 2020.

Is anything coming down the pipeline?

Maybe! AVIF, which is in many ways an improvement over WebP (including image size), is looking like a strong possibility. As of this writing, AVIF’s browser support is dismal, but that may change.

Google added support for it in its upcoming release of Chrome 85 (which means Edge, a Chrome clone, will too), and Firefox already has experimental support starting with Firefox 77, which you can enable in about:config. So far, that’s it, but it’s a good sign.

One of WebP’s real drawbacks is its lack of OS support; with the exception of some command line tools and Photoshop plugins, there isn’t much by way of viewing and editing WebP images on your machine. Contrast with JPEG, supported by every browser ever made and every OS.

Somewhat unfortunately, neither AVIF nor WebP offer a progressive format, which can lead to a seemingly faster experience for users, the tradeoff being smaller file sizes which load faster to begin with.

#internet #future #programming #ios #web-development

The Future of Image Formats on the Web
1.25 GEEK