[New-bugs-announce] [issue45639] Support modern image formats in MIME types

Adam Konrad report at bugs.python.org
Wed Oct 27 22:33:34 EDT 2021


New submission from Adam Konrad <kixorz at gmail.com>:

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.

----------
components: Library (Lib)
messages: 405145
nosy: adamkonrad
priority: normal
severity: normal
status: open
title: Support modern image formats in MIME types
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45639>
_______________________________________


More information about the New-bugs-announce mailing list