easy-thumbnails icon indicating copy to clipboard operation
easy-thumbnails copied to clipboard

WebP is widely available now - add default support?

Open foucdeg opened this issue 1 year ago • 6 comments

WebP is widely available now and considered "baseline". We are considering full adoption without a PNG / JPG fallback, and we'd like easy-thumbnails to only generate a WebP thumbnail and not bother with jpg / png.

The explanation given on https://easy-thumbnails.readthedocs.io/en/latest/ref/webp/ made perfect sense when it was written, but now, I think more and more developers will consider using only webp.

Are there any plans to add a WebP-first mode to easy-thumbnails?

foucdeg avatar Dec 01 '24 16:12 foucdeg

it's already there, you would just use the setting THUMBNAIL_EXTENSION = "webp" and get webp everywhere. Or is this not what you would want?

benzkji avatar Jan 07 '25 13:01 benzkji

Agreed, docs could be more up to date. They are not rendered already for a while...

benzkji avatar Jan 07 '25 13:01 benzkji

@benzkji great to hear that it's supported! Indeed the docs aren't clear about webp support. If a maintainer could update them, I'd be happy to update my config based on the new docs.

foucdeg avatar Jan 07 '25 14:01 foucdeg

if you only need webp and nothing else, THUMBNAIL_EXTENSION should be enough. The old docs about webp, when it still was experimental could even be removed, IMHO.

benzkji avatar Jan 07 '25 14:01 benzkji

https://easy-thumbnails.readthedocs.io/en/latest/ref/settings/#easy_thumbnails.conf.Settings.THUMBNAIL_EXTENSION

and even:
https://easy-thumbnails.readthedocs.io/en/latest/ref/settings/#easy_thumbnails.conf.Settings.THUMBNAIL_TRANSPARENCY_EXTENSION

benzkji avatar Jan 07 '25 14:01 benzkji

Yep, simply doing this fixes everything, no need to do anything else.

THUMBNAIL_EXTENSION = "webp"
THUMBNAIL_TRANSPARENCY_EXTENSION = "webp"

robertpro avatar Apr 12 '25 07:04 robertpro