From 20a5b7e986377bdfd929d7e8c4e3db5847dfdb2d Mon Sep 17 00:00:00 2001 From: Ilya Stepin Date: Sun, 21 Mar 2021 02:06:27 +0300 Subject: bpo-43542: Add heif/heic formats in mimetypes (GH-24917) * 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 --- Lib/mimetypes.py | 2 ++ Misc/NEWS.d/next/Library/2021-03-20-15-43-25.bpo-43542.6bt2F6.rst | 1 + 2 files changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2021-03-20-15-43-25.bpo-43542.6bt2F6.rst diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index d2c8ac7..018793c 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -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 index 0000000..370e520 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-03-20-15-43-25.bpo-43542.6bt2F6.rst @@ -0,0 +1 @@ +``image/heic`` and ``image/heif`` were added to :mod:`mimetypes`. -- cgit v0.12