Access to historical image version
Hi,
When uploading and overwriting an existing image it seems like the previous url, with the old version in it, is pointing to the new image.
For example these 2 urls display the same (new) image:
Old image: http://res.cloudinary.com/xxx/image/upload/v1517754413/assets/some_image.png
New image: http://res.cloudinary.com/xxx/image/upload/v1520241083/assets/some_image.png
Further more, looks like the version number is totally irrelevant, even this url gives the latest image (instead of 404 for example):
http://res.cloudinary.com/xxx/image/upload/v9999999999/assets/some_image.png
Is there some other way to reference old versions?
Thanks,
Yuval.
-
Hi Yuval,
Using versions is a method to initially cache bust the CDN rather than keeping track of older images.
The version is the timestamp of uploading the image and if enough time has passed the older version will update to be the newer version as well.
Hope this helps, please let us know if you have any other questions
0 -
Hi Raya,
But in the Media Library I DO see there is access to old versions... Isn't it supported for public use as well? (I mean officially)
0 -
Hey Yuval,
It is possible that you can see older versions of images. However, since in their function they are meant to cache bust the CDN, you can't rely on them to display the older version of the image.
Thanks,
Raya
0 -
That's not what I meant.
See in the image below, in the Media Library, I can click on the "view backed up versions" and it brings all the historical versions, clicking on any of the versions will open the image in new tab. So the images are there, it would be nice to have a public url that will point to these images...
0 -
Hi Yuval,
Thanks for the clarification. In general, the backup versions are only meant to restore old versions of the image and not for other purposes.
After consulting with our Dev team, the best option to deliver older versions of the image with the same public id is to re-upload them add a version name to the public id. For example,
version1/101/production/iphone/101_iPhone_01_Welcome
Hope that makes sense,
0 -
Not really, but I'm sure there are good technical reasons why it's like that. Anyway, in that case, the term "version" in the url is quite misleading, should consider changing it :)
Thanks,
Yuval.2
Post is closed for comments.
Comments
6 comments