django-webp icon indicating copy to clipboard operation
django-webp copied to clipboard

move covert logic to storage

Open lovemyliwu opened this issue 8 years ago • 1 comments

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 avatar Nov 26 '16 05:11 lovemyliwu

@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

andrefarzat avatar Nov 30 '16 03:11 andrefarzat