Skip to content

Support webp and avif image formats in mimetypes #89802

Closed

Description

@kixorz
mannequin
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']

    Activity

    1. kixorz commented on Oct 28, 2021

      kixorzmannequin
      MannequinAuthor

      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.

    2. added
      3.11only security fixes
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      on Oct 28, 2021
    3. changed the title [-]Support modern image formats in MIME types[/-] [+]Support webp and aivf image formats in mimetypes[/+] on Feb 2, 2022
    4. changed the title [-]Support modern image formats in MIME types[/-] [+]Support webp and aivf image formats in mimetypes[/+] on Feb 2, 2022
    5. changed the title [-]Support webp and aivf image formats in mimetypes[/-] [+]Support webp and avif image formats in mimetypes[/+] on Feb 2, 2022
    6. changed the title [-]Support webp and aivf image formats in mimetypes[/-] [+]Support webp and avif image formats in mimetypes[/+] on Feb 2, 2022
    7. transferred this issue fromon Apr 10, 2022
    8. JelleZijlstra commented on May 3, 2022

      @JelleZijlstra
      Member

      Thanks for your contribution!

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.11only security fixesstdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions