Description
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