django-webp
django-webp copied to clipboard
move covert logic to storage
right now the covert logic in template tags level, in debug env it's awesome.
but in production env, it's bad to dynamic generate webp, we need do this in collectstatic step.
so the better way is move covert logic to custom storage.
better to extend ManifestStaticFilesStorage class.
in json file would be like below:
{'foo.png': 'foo.hash.png', 'foo.webp': 'foo.hash.webp'}
@lovemyliwu this is a really good idea! Finally I have time to study the ManifestStaticFilesStorage
.
Will be implementing it soon 😸
Thanks a lot for the tip. Will keep this issue open until I get start on it