Page MenuHomePhabricator

Add support for JPEG XL: allow JXL uploads in MediaWiki
Open, Stalled, Needs TriagePublic


JPEG XL is a new royalty-free format by the JPEG Group that excels at doing {near-,visually,mathematically}lossless compression. Compared to video-inspired codecs like WebP and AVIF, it claims to preserve photographic texture better. It works well for photographs and synthetic images alike, so it may as well become some sort of universal format for Commons.

The bitstream is frozen on December 25, 2020. ImageMagick already has RW support by delegating to the reference implementation library (Apache License 2.0).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Aklapper changed the task status from Open to Stalled.Dec 27 2020, 6:22 PM
Aklapper edited projects, added Upstream; removed MediaWiki-File-management.

We rely on Debian packages. Maybe some recent ImageMagick code has support.
But the only thing that is relevant is: Is that ImageMagick version included in the stable Debian version which is used on all Wikimedia servers.

This format appears to be very new, and it doesn't look like there's wide support for it yet. It would be helpful to know the following:

  1. Minimum ImageMagick version required
  2. Does a Debian package exist for the reference library?
  3. Are there alternative libraries?
  4. What browsers, if any, support or plan to support this format?
  5. Does common image generation and editing software support or plan to support this format?
  1. Per , first commit that introduces JPEG XL is on 2019-10-05 (release 7.0.8-68). The reference library is used from 2020-12-27 (release 7.0.10-54).
  2. No Debian package in the repository yet, although sources are available on
  3. ?
  4. Google Chrome ships with experimental support at least on Windows/Linux/Mac/Android. Firefox is working on it.
  5. GIMP plugin is already available with the reference library:

I have very much been looking forward to JPEG XL support on Wikimedia Commons.
Currently the only way to publish wide gamut pictures (>8bits) is PNG (lossless completely inappropriate for natural content) or TIFF (also lossless and cannot be displayed in-browser), so in most cases I publish as sRGB JPEG and lose all the extra color information that current cameras capture.

all the extra color information that current cameras capture.

What about AVIF? What about ICC profiles?

all the extra color information that current cameras capture.

What about AVIF? What about ICC profiles?

Whatever free modern format gets implemented is fine with me, so long as we finally get one. ICC profiles are everywhere but it doesn't help when JPEG has only 8-bit color depth; using a wider ICC profile with small bit depth results in more color banding.

Just FYI: 14 days ago ImageMagick already fixed JXL integration since in 0.5 version JXL now requires setting color space info. JXL can preserve JPEGs losslessly!

As for AVIF, the biggest problem is that it does not yet have center chroma siting for 4:2:0 used in JPEG. At all.

Also, please remember that AVIF needs nclx atom to be set correctly: for sRGB to transfer sRGB, primaries BT.709 and matrix that is in JPEG is full range BT.601. Very important.

Appreciate the heads-up, but I am pretty sure the very relevant follow-up would be: which version is Debian stale on? The hesitancy of the team to even backport testing/unstable source packages has been a persistent roadblock to us getting good things.