thephpleague / glide

Wonderfully easy on-demand image manipulation library with an HTTP based API.
http://glide.thephpleague.com
MIT License
2.55k stars 198 forks source link

Filenames For Cached Image #264

Closed pxwee5 closed 3 years ago

pxwee5 commented 5 years ago

Is there a way to not use md5 hash on the output of the cached filenames? I'm looking to generate both test.jpg and test.webp at the same time. Filename must be the same but different ext.

The cache filenames can also be test-200w-100h.jpg and test-200w-100h.webp for different size params.

Is this possible with the 1.x version of Glide?

BTW, this is required based on Google's recommendation on serving webp images with Content Negotiation. https://developers.google.com/speed/webp/faq , where the server searches for a .webp file of the same name first before falling back to the original file.

tgalopin commented 3 years ago

Not currently possible AFAIK but planned in the next major of Glide (https://github.com/thephpleague/glide/issues/288)