https://github.com/python/cpython/commit/1f55caf97e0906f2b8b693b01d3d6073df8187c1
commit: 1f55caf97e0906f2b8b693b01d3d6073df8187c1
branch: main
author: FooIbar <[email protected]>
committer: encukou <[email protected]>
date: 2026-01-26T15:26:55+01:00
summary:

gh-144212: Add `image/jxl` to `mimetypes` (GH-144213)

files:
A Misc/NEWS.d/next/Library/2026-01-24-23-11-17.gh-issue-144212.IXqVL8.rst
M Doc/whatsnew/3.15.rst
M Lib/mimetypes.py
M Lib/test/test_mimetypes.py

diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst
index c412f48606c045..aec6b1ceea37cf 100644
--- a/Doc/whatsnew/3.15.rst
+++ b/Doc/whatsnew/3.15.rst
@@ -606,6 +606,7 @@ mimetypes
 * Add ``application/dicom`` MIME type for ``.dcm`` extension. (Contributed by 
Benedikt Johannes in :gh:`144217`.)
 * Add ``application/node`` MIME type for ``.cjs`` extension. (Contributed by 
John Franey in :gh:`140937`.)
 * Add ``application/toml``. (Contributed by Gil Forcada in :gh:`139959`.)
+* Add ``image/jxl``. (Contributed by Foolbar in :gh:`144213`.)
 * Rename ``application/x-texinfo`` to ``application/texinfo``.
   (Contributed by Charlie Lin in :gh:`140165`.)
 * Changed the MIME type for ``.ai`` files to ``application/pdf``.
diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py
index 361f924b55da1e..fc916c470a0110 100644
--- a/Lib/mimetypes.py
+++ b/Lib/mimetypes.py
@@ -609,6 +609,7 @@ def _default_mime_types():
         '.jpeg'   : 'image/jpeg',
         '.jpm'    : 'image/jpm',
         '.jpx'    : 'image/jpx',
+        '.jxl'    : 'image/jxl',
         '.heic'   : 'image/heic',
         '.heif'   : 'image/heif',
         '.png'    : 'image/png',
diff --git a/Lib/test/test_mimetypes.py b/Lib/test/test_mimetypes.py
index 32adc59359108f..fe7584f1f9d3b3 100644
--- a/Lib/test/test_mimetypes.py
+++ b/Lib/test/test_mimetypes.py
@@ -271,6 +271,7 @@ def check_extensions():
                 ("image/jp2", ".jp2"),
                 ("image/jpeg", ".jpg"),
                 ("image/jpm", ".jpm"),
+                ("image/jxl", ".jxl"),
                 ("image/t38", ".t38"),
                 ("image/tiff", ".tiff"),
                 ("image/tiff-fx", ".tfx"),
diff --git 
a/Misc/NEWS.d/next/Library/2026-01-24-23-11-17.gh-issue-144212.IXqVL8.rst 
b/Misc/NEWS.d/next/Library/2026-01-24-23-11-17.gh-issue-144212.IXqVL8.rst
new file mode 100644
index 00000000000000..be77fb345adae3
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2026-01-24-23-11-17.gh-issue-144212.IXqVL8.rst
@@ -0,0 +1 @@
+Mime type ``image/jxl`` is now supported by :mod:`mimetypes`.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to