How can I upload an image once and get two URLs, one for a full-res version and one for a low-res?
Hello,
I need to upload an image from my Android app, but since the images can be a bit large, I want to be able to have two different versions, one low res and one full res.
However I would like to to this in one step, so as to avoid wasting bandwidth by uploading twice the same picture.
I am not aware of any option to upload and image, get the full-res URL and then apply a scale transformation and get a different URL for that. Is there a way to do this?
Otherwise, the only way I can think of would be to upload the full res version, get the URL and then upload a new image but fetching it from the full-res version URL, so basically from Cloudinary to Cloudinary.
Is this a possible workaround?
Thanks!
-
This can be done using presets in Upload settings. Create a preset with eager transformations and then set the preset as default preset in upload settings. This will create multiple images with each transformation for uploaded full resolution image. Later when you send a request for download, specifying same transformation will get the pre-transformed image.
Alternatively, while upload you can specify eager transformations. Image will be uploaded only once.
Post is closed for comments.
Comments
1 comment