I've replaced an existing image with a new one, but my website still shows the old one. Why is that?

Follow

Comments

33 comments

  • Avatar
    Daniel Mendoza

    Hi Daniel,

    I just want to add to Stephen's above message. In React the parameters in <Image parameters /> and <Video parameters /> tag can include the version component. e.g.

    <Image cloudName="demo" publicId="sample" width="300" crop="scale" version="1531412312"/>

    Cheers,
    Daniel

    0
    Comment actions Permalink
  • Avatar
    Malcolm Hendeson

    Shirly said: You can add `invalidate:true` on upload and it will invalidate the new version. For example in NodeJS:

    cloudinary.v2.uploader.upload(".../../myNewImage.jpg",{ public_id: "sample",invalidate:true },
    function(error, result) {console.log(result, error) });

    Why does this not work for Unsigned Uploads? This thing is driving me nuts! It's seriously changing my mind about using Cloudinary in my projects.

    0
    Comment actions Permalink
  • Avatar
    Marissa Masangcay

    Hi,

    Thank you for pointing out the link. I have updated it so that it points to the right part of the documentation now.

    Regarding using the version component, this isn't something that needs to be enabled as it comes automatically for all accounts. If you're uploading via the Media Library you will see that the version component is already included in the URL found when clicking on the image once it's successfully uploaded. And if you're uploading via the API you will see the version number is included in the URL parameter.

    If you want to include version numbers in your URLs, I would recommend disabling the Invalidate versioned URLs setting as updating the URL with the newest version number when it's replaced will show the newest asset.

    I hope this helps!

    -1
    Comment actions Permalink

Please sign in to leave a comment.