]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-43542: Add heif/heic formats in mimetypes (GH-24917)
authorIlya Stepin <stepinilya@gmail.com>
Sat, 20 Mar 2021 23:06:27 +0000 (02:06 +0300)
committerGitHub <noreply@github.com>
Sat, 20 Mar 2021 23:06:27 +0000 (16:06 -0700)
* bpo-43542: Add heif/heic formats in mimetypes

Add HEIF and HEIC format to list of media types. It has IANA registration.

IANA: https://www.iana.org/assignments/media-types/image/heic
HEIF Github: https://github.com/nokiatech/heif

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Lib/mimetypes.py
Misc/NEWS.d/next/Library/2021-03-20-15-43-25.bpo-43542.6bt2F6.rst [new file with mode: 0644]

index d2c8ac76dcc0850a3a9e1b3497688235e4ebc82e..018793c4f01e46adfc970b290250d426645b0f51 100644 (file)
@@ -505,6 +505,8 @@ def _default_mime_types():
         '.jpg'    : 'image/jpeg',
         '.jpe'    : 'image/jpeg',
         '.jpeg'   : 'image/jpeg',
+        '.heic'   : 'image/heic',
+        '.heif'   : 'image/heif',
         '.png'    : 'image/png',
         '.svg'    : 'image/svg+xml',
         '.tiff'   : 'image/tiff',
diff --git a/Misc/NEWS.d/next/Library/2021-03-20-15-43-25.bpo-43542.6bt2F6.rst b/Misc/NEWS.d/next/Library/2021-03-20-15-43-25.bpo-43542.6bt2F6.rst
new file mode 100644 (file)
index 0000000..370e520
--- /dev/null
@@ -0,0 +1 @@
+``image/heic`` and ``image/heif`` were added to :mod:`mimetypes`.