Add image/jxl (JPEG XL) to the media upload MIME allowlist
Author: jettwayioCreated Sep 27, 2026Updated Sep 28, 2026
Labelsbugarea/corebot:enhancementbot:in-review
Description
Currently there are only "image/png", "image/jpeg", "image/gif", "image/webp", "image/avif", "image/bmp" mimes allowed for images, and uploading a .jxl file gives "File type not allowed" (GLOBAL_UPLOAD_ALLOWLIST in media-allowlist.ts). Same shape of gap as #2602 (AVIF) and #3063 (BMP).
JXL can losslessly recompress existing JPEGs ~20% smaller, so it's genuinely useful for media libraries built from WordPress imports even before browsers fully support it. Browser support right now is basically Safari only (since 17, stills only, no animation/progressive). Chrome's had a decoder behind a flag since 145 (Feb 2026), Firefox has an intent-to-ship targeting 157, neither is on by default yet.
Two separate things here:
- Add image/jxl to GLOBAL_UPLOAD_ALLOWLIST — safe to store regardless of render support, same reasoning as AVIF/BMP (no stored-XSS risk like SVG).
- Whether it also goes into SAFE_INLINE_TYPES / SAFE_INLINE_IMAGE_TYPES is a separate call — serving raw .jxl inline won't render for most visitors right now, might make more sense to route it through the existing transform pipeline (the one already re-encoding to WebP/AVIF at quality 85) instead of passing the bytes straight through.
Steps to reproduce
NA
Environment
- emdash: 0.40.1
Screenshots
NA
Logs / error output
Source: emdash-cms/emdash