Skip to content

[ENH]: saving images in webp format #21162

Closed
@LinasNas

Description

@LinasNas

Problem

I've noticed that matplotlib currently doesn't support saving images in webp format, which I later confirmed by looking into supported file formats in backend_bases.py file.

Saving images in webp would definitely be useful for users who want to upload the graphs they generate in matplotlib to the web. Compression to webp helps significantly reduce the image size, without losing quality. More information about webp can be found here.

Proposed solution

Would it be possible to add webp as a supported image saving format? It seems that Pillow package is automatically installed as a dependency when installing matplotlib. Pillow makes it relatively easy to convert an image to webp using the save() method. More detailed information can be found in the documentation

Additional context and prior art

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good first issueOpen a pull request against these issues if there are no active ones!New feature

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions