Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support webp and avif image formats in mimetypes #89802

Closed
kixorz mannequin opened this issue Oct 28, 2021 · 2 comments
Closed

Support webp and avif image formats in mimetypes #89802

kixorz mannequin opened this issue Oct 28, 2021 · 2 comments
Labels
3.11 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@kixorz
Copy link
Mannequin

kixorz mannequin commented Oct 28, 2021

BPO 45639
Nosy @kixorz
PRs
  • bpo-45639: Add webp and avif image formats to mimetypes #29259
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2021-10-28.02:33:34.449>
    labels = ['type-feature', 'library', '3.11']
    title = 'Support webp and avif image formats in mimetypes'
    updated_at = <Date 2022-02-02.02:50:29.382>
    user = 'https://github.com/kixorz'

    bugs.python.org fields:

    activity = <Date 2022-02-02.02:50:29.382>
    actor = 'eric.araujo'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2021-10-28.02:33:34.449>
    creator = 'adamkonrad'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45639
    keywords = ['patch']
    message_count = 1.0
    messages = ['405145']
    nosy_count = 1.0
    nosy_names = ['adamkonrad']
    pr_nums = ['29259']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue45639'
    versions = ['Python 3.11']

    @kixorz
    Copy link
    Mannequin Author

    kixorz mannequin commented Oct 28, 2021

    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.

    @kixorz kixorz mannequin added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Oct 28, 2021
    @iritkatriel iritkatriel removed 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes labels Jan 15, 2022
    @merwok merwok changed the title Support modern image formats in MIME types Support webp and aivf image formats in mimetypes Feb 2, 2022
    @merwok merwok changed the title Support modern image formats in MIME types Support webp and aivf image formats in mimetypes Feb 2, 2022
    @merwok merwok changed the title Support webp and aivf image formats in mimetypes Support webp and avif image formats in mimetypes Feb 2, 2022
    @merwok merwok changed the title Support webp and aivf image formats in mimetypes Support webp and avif image formats in mimetypes Feb 2, 2022
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @JelleZijlstra
    Copy link
    Member

    Thanks for your contribution!

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants