Make WordPress Core

Opened 3 years ago

Closed 2 years ago

Last modified 22 months ago

#52788 closed feature request (maybelater)

Add JPEG XL support.

Reported by: atjn's profile atjn Owned by: adamsilverstein's profile adamsilverstein
Milestone: Priority: normal
Severity: normal Version:
Component: Media Keywords:
Focuses: performance Cc:

Description

JPEG XL is a new image format that beats JPEG, PNG, WebP and AVIF in pretty much all categories. I believe it will be widely used on the internet in a few years.

Cloudinary has made an awesome overview that shows why JPEG XL is better than anything else. Please note that they helped make the format, so they could be biased, but I haven't found any issues with it.

First and foremost it would be great to support uploading it to media, but down the line I think it could be used for much more. Thumbnails of any other image type could be generated in JPEG XL, greatly improving performance. It might even make sense to support delivering any source image as a JPEG XL, no matter the original encoding.

Here are a few points I think are especially nice for WordPress:

  • Encoding speed is better than WebP and AVIF, so there's no risk that users would have to upgrade their server to use it.
  • It supports progressive decode which is huge for perceived performance, and could theoretically allow you to only produce one large thumbnail and then just not load the entire image when you need a smaller preview.
  • It is expected to be widely supported, meaning users can use it as their main local editing format, they can download and directly view the images, and it will work in all browsers. This is not the case for WebP and AVIF, which has caused a lot of frustration among developers and end-users.

JPEG XL is, as of writing, not supported in any browsers, but will almost certainly be soon. Chromium has marked it as their highest priority. You can see the current status here: caniuse.com/jpegxl

The official JPEG XL page is here: jpeg.org/jpegxl
A free and open source encoder/decoder is in the works: gitlab.com/wg1/jpeg-xl

Change History (9)

#1 @adamsilverstein
3 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Owner set to adamsilverstein
  • Status changed from new to assigned

#2 @atjn
3 years ago

If you want to play around with it, I can recommend Squoosh. Just remember that the encoder is in early beta, so it will be slower and produce larger files than it should do.

#3 follow-up: @spacedmonkey
3 years ago

Having a quick look into this, it seems like neither of the imagick or gd support this codex. So until they support it, feels like it unlikely core can.

#4 in reply to: ↑ 3 @atjn
3 years ago

Replying to spacedmonkey

Good point! As far as I can tell, it is already supported in imagick: https://imagemagick.org/script/formats.php#supported

If JPEG XL becomes widely supported in browsers, I would expect GD to add support, the same way they have done with WebP and AVIF.

#5 @atjn
3 years ago

You can now enable experimental JPEG XL support in Chrome, Edge, and Firefox: https://caniuse.com/jpegxl

#6 @adamsilverstein
3 years ago

Noting that JPEGXL support is being proposed for libgd in https://github.com/libgd/libgd/issues/699.

#7 @mukesh27
2 years ago

  • Milestone Future Release deleted
  • Resolution set to maybelater
  • Status changed from assigned to closed

We're probably years away from widespread JPEG XL support in browsers as the majority of browsers do not support it natively. Once the browser and gd added support for JPEG XL then we can check if WordPress core allows it to not.

For now, mark it as maybelater. Feel free to open it if you think you have any solutions or feedback.

#8 @sabernhardt
22 months ago

#56742 was marked as a duplicate.

#9 @gregbenz
22 months ago

Chrome, Firefox, Edge, Brave support JXL via developer flags / development builds. Native browser support is on the near horizon.
https://jpegxl.io/articles/browser-support/

Note: See TracTickets for help on using tickets.