wagtail / Willow

A wrapper that combines the functionality of multiple Python image libraries into one API
https://willow.wagtail.org/
BSD 3-Clause "New" or "Revised" License
273 stars 53 forks source link

cannot write mode P as WEBP #89

Open chadsaun opened 3 years ago

chadsaun commented 3 years ago

I have a .png image that is throwing this error:

cannot write mode P as WEBP

from the line with self.image.save in Willow:

    @Image.operation
    def save_as_webp(self, f, quality=80, lossless=False):
        self.image.save(f, 'WEBP', quality=quality, lossless=lossless) …
        return WebPImageFile(f)

Screen Shot 2021-03-10 at 4 20 31 PM