image version control

Comments

6 comments

  • Avatar
    Shirly Manor

    Hi John,

    Thank you for your question!

    When you upload a new image while specifying its public_id to be the same as an existing image, your Cloudinary account will be updated with the new image overwriting the old one. However, if the original (older) image has already been accessed, it might already be cached in the CDN: if you access the exact same URL you will still be accessing a CDN cached version rather than the new updated one.

    You can read more about it here:

    https://support.cloudinary.com/hc/en-us/articles/202520912-What-are-image-versions-

    Thanks,

    0
    Comment actions Permalink
  • Avatar
    John Higgins

    Hi Shirly, thanks for your feedback. We still have the same issue as described above with version control. I can understand that there may be a delay before the latest image update overwrites the old image but we have the same issue one week on? If the version number is not included in the URL then the wrong image is being returned. 

    I have not seen this issue with other images we have updated (we have about 30K images on Cloudinary) and we update them regularly. Would you mind having a look at the links above and let me know what you think?

    Thanks

    John

       

         

    0
    Comment actions Permalink
  • Avatar
    John Higgins

    Hi Shirly, I have tested another image update and I am seeing the same issue again. if you compare these two links: http://res.cloudinary.com/tg4/image/upload/047934.jpg 

    this link is the most recent update: http://res.cloudinary.com/tg4/image/upload/v1508239649/047934.jpg

    I have cleared the browser cache and used different browsers but still getting the same issue. How long will the image remain in the Cloudinary Cache?

     

    Thanks

    John

     

     

     

    0
    Comment actions Permalink
  • Avatar
    Shirly Manor

    Hi John,

    Thank you for reaching out.

    When uploading an already uploaded image you can use the versioned url from the upload callback and use it instead of the previous (original) one.

    The image can be cached in the CDN for up to 30 days.

    You can read more about it here:

    https://support.cloudinary.com/hc/en-us/articles/202520852-How-can-I-update-an-already-uploaded-image-

    Please let me know if that answers your questions,

    Thanks,

    0
    Comment actions Permalink
  • Avatar
    John Higgins

    Hi Shirly, thanks for your feedback. We are unable to use the versioned url as we don't know what the version number is prior to recalling the image from the server. We therefore need to recall the image using the public_id which in this case is our product code. Any device requesting images from our server forms the URL by using the Cloudinary base URL plus our in-house product code.  Like this: http://res.cloudinary.com/tg4/image/upload/047934.jpg 

    Is there a way that we can request the CDN Cache to be cleared when updating an image or can you do it automatically when an image has been updated?      

    Thanks

    John

     

     

    0
    Comment actions Permalink
  • Avatar
    Shirly Manor

    Hi John,

    Alternatively, if you are using our API, you can set the `invalidate` parameter to `true` while uploading in order to invalidate the image through the CDN. Note that it might take up to an hour for the invalidation to fully propagate through the CDN, while the version component affects immediately. When uploading via the Media-Library the invalidation comes built-in in the request.

    You can read more about it here:

    https://cloudinary.com/documentation/upload_images#invalidating_cached_images_on_the_cdn

    Thanks,

    Shirly

    0
    Comment actions Permalink

Please sign in to leave a comment.