Support JPEG XL (JXL) file format for attachments/embeds

Use case or problem

I would like to make use of some of my JPEG files which have been converted into JPEG XL format for better compression.

This would currently only really be beneficial to local vaults, not ones published online as JPEG XL isn’t widely supported on the web compared to some other more modern formats, such as WebP.

Proposed solution

Support both lossy and lossless JXLs.

Current workaround (optional)

Losslessly convert JXLs back into JPG format. Webp is an option, and maybe eventually AVIF too.

Related feature requests (optional)


This is unlikely to happen until there is widespread browser/OS support. AVIF is more likely.

I recently discovered JPEG XL myself and wanted to use them here, but yeah, the web’s not catching up as fast as we’d like. Support for both lossy and lossless JXLs would be spot-on! Meanwhile, I’ve been doing this weird dance of converting JXLs back to JPG for now. It works, but it’s not the most convenient. Have you guys used a JPEG optimizer to compress image? Super handy! Maybe it could be part of our workaround toolbox?