This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Support webp and avif image formats in mimetypes
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.11
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: adamkonrad
Priority: normal Keywords: patch

Created on 2021-10-28 02:33 by adamkonrad, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 29259 open adamkonrad, 2021-10-28 02:35
Messages (1)
msg405145 - (view) Author: Adam Konrad (adamkonrad) * Date: 2021-10-28 02:33
Modern image types webp and avif are not recognized by the mimetypes module.

Problem: Many tools are written in Python and running on macOS. Good example is the AWS CLI. Running commands like "s3 sync" will save files with .webp and .avif extensions with incorrect "binary/octet-stream" Content-Type to S3. This creates additional problems with serving these resources over HTTP.

The webp and avif image types are supported by most browsers: https://caniuse.com/#feat=webp
https://caniuse.com/#feat=avif

While webp is fully supported and largely used, it is not officially registered with IANA.

Avif is currently less popular, it is fully registered with IANA.
https://www.iana.org/assignments/media-types/media-types.xhtml

Please consider the attached GitHub PR as a fix to these MIME Content-Type issues.
History
Date User Action Args
2022-04-11 14:59:51adminsetgithub: 89802
2022-02-02 02:52:36eric.araujolinkissue42205 superseder
2022-02-02 02:51:57eric.araujolinkissue42049 superseder
2022-02-02 02:51:21eric.araujolinkissue38902 superseder
2022-02-02 02:50:29eric.araujosettitle: Support webp and aivf image formats in mimetypes -> Support webp and avif image formats in mimetypes
2022-02-02 02:50:04eric.araujosettitle: Support modern image formats in MIME types -> Support webp and aivf image formats in mimetypes
2022-01-15 16:32:03iritkatrielsetversions: - Python 3.6, Python 3.7, Python 3.8, Python 3.9, Python 3.10
2021-10-28 02:35:27adamkonradsetkeywords: + patch
stage: patch review
pull_requests: + pull_request27523
2021-10-28 02:33:34adamkonradcreate