netlify-plugin-cloudinary
netlify-plugin-cloudinary copied to clipboard
[Feature] Drop Image MD5 values from image names
Feature Request
When an image is created through static rendering, it includes the actual image prepended to a MD5 of image. For example, an image bird-8172597_1280.jpg is uploaded to Cloudinary as bird-8172597_1280-725f0013dd4d83931bd8e4036f727dac.jpg. Consider dropping the value after the last - so that the image name is retained.
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
Describe alternatives you've considered
Additional context
@akshay-ranganath it's been a little bit since I wrote that, but I think the original intent of this was to help preventing duplicate uploads but also allow an image to be uploaded again if the file changed. couple scenarios for instance:
- /images/image-1.jpg is created, uploaded, and never changeed, so the ID is retained, and using
overwrite:true, the file doesn't get re-uploaded as the public ID already eixsts - /images/image-2.jpg is created, uploaded, 1 week later changes, so the ID changes and the file is reuploaded so that the project delivers the new version of the image
any thoughts on that?
i was also considering the idea of seeing if we could utilize a caching mechanism, which could theoretically replace this, which would store the hash references for the files to avoid even having to do a lookup network request in the first place. i haven't explored this much yet as I'd also have to find a reliable way to do that between builds, but could be a way to avoid the custom public ID if that's frowned upon