cloudinary / cloudinary_js

Cloudinary JavaScript library
MIT License
328 stars 224 forks source link

Option to serve downscaled large images if one is already cached #84

Closed gausie closed 8 years ago

gausie commented 8 years ago

It would be good if, when a large version of an image has already been cached and a smaller version is requested, that the large one is supplied in a downscaled state.

roeeba commented 8 years ago

Hi @gausie , Can you please provide an example, which demonstrates the use-case? Note that each derived (i.e., scaled) version is represented by its own URL and is cached separately. If you are referring to an updated original image, make sure you set invalidate to true in order to refresh the cache. Please see here for more information.

roeeba commented 8 years ago

Closing this issue due to the time elapsed. Please feel free to either re-open the issue, contact our support at http://support.cloudinary.com or create a new ticket if you have any additional issues.

prokilogrammer commented 7 years ago

Can I pass invalidate to .upload method in the Javascript SDK?

roeeba commented 7 years ago

Hi @prokilogrammer , unsigned uploads are restricted from deleting or overwriting resources. Therefore there is no use in invalidating. In order to update a resource you will have to use one of the server-side frameworks (Node.js, PHP, etc).

prokilogrammer commented 7 years ago

Oh interesting. I thought cloudinary_js code was also used in NodeJS where I use signed requests. Didn't realize there was a different package for it. Thanks!

roeeba commented 7 years ago

The Node.js library indeed uses cloudinary_js, but while the core library is pure client-side - on node.js you can also generate signatures and perform signed requests.