If you want to use JPEG XL and you happen to use Gentoo or a BSD or have some other reason to build Firefox from source (sorry), you can enable the upcoming JPEG XL support that has been in testing in Firefox Nightly for the past 18 months or so. It's right there in the source code, just only enabled for Nightly builds. These instructions are specific to Gentoo but it basically amounts to making a few trivial changes to the build system, so you could adapt the steps to other operating systems.
If you use Librewolf, skip directly to step 4 because your browser already has JPEG XL support built in. (Please change as few options as possible in Librewolf to keep the anti-fingerprinting benefits. Don't touch anything else.)
- Grab this patch from Librewolf and drop it in
/etc/portage/patches/www-client/firefox/. This patch modifies the Mozilla build system to just check if you asked for JPEG XL support instead of also checking that we're building a Nightly build. - Drop this second patch in the same folder,
enable-JXL.patch. We're altering the build process by applying patches, and in this ebuild, patches are applied in advance of building out the mozconfig file Firefox uses to control its build process. Luckily we just want to add one line to the mozconfig, so this patch drops a new file with the line we want to add and the build proceeds as normal.--- a/.mozconfig 1969-12-31 19:00:00.000000000 -0500 +++ b/.mozconfig 2023-01-13 20:53:21.754124060 -0500 @@ -0,0 +1 @@ +ac_add_options --enable-jxl
emerge firefoxand come back in 15 minutes if you have a Threadripper or six hours if you have a Core 2 Duo (sorry).- Open Firefox, type
about:configin the address bar, accept the warning, and find and toggleimage.jxl.enabledto true. - Bask in the glory of Iceberg.
might want to look into crossdev/distcc if you have multiple machines, by the way!
