algoo / preview-generator

generates previews of files with cache management
https://pypi.org/project/preview-generator/
MIT License
235 stars 51 forks source link

Feat: Add support for webp image #273

Closed inkhey closed 3 years ago

inkhey commented 3 years ago

Feature description and goals

Webp image is not supported in preview-generator 0.25. It's an interesting image format to support: https://en.wikipedia.org/wiki/WebP

preview_generator.exception.UnsupportedMimeType: Unsupported mimetype: image/webp

Implemented solution:

https://github.com/algoo/preview-generator/pull/276

a523 commented 3 years ago

Yeah, I think it is caused by this function builder.get_supported_mimetypes not getting the correct and complete result.

inkhey commented 3 years ago

Yes, the issue is both missing package to decode webp and missing mimetype support in list. I just created a draft PR with support in ImageMagick CLI builder (of course , this should be adapt to wand as soon as your dev is ok @a523 )

Also, it seems that animated webp is not supported (need verification).

inkhey commented 3 years ago

fixed by #276