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




  • Avatar
    Jerry Cornejo

    Because we don't want to have to change the image URL in the HTML code on our site every time we update an image, we are not using the version in the URL. As such, does this then mean that if we replace an image through the Media Library it will take up to an hour to update on our site? Is there no way to manually clear cache or at least reduce that wait time to a few minutes?

  • Avatar
    Nadav Ofir

    Hi Jerry,
    Usually this procedure shouldn't take more than a few minutes in order to be reflected to the majority of your users. However, since Akamai operates hundreds of thousands of servers around the world, our official commitment is for 1 hour invalidation.
    If you're experiencing specific high latency, don't hesitate to contact us with details via a support ticket.

  • Avatar
    Julbox Ltd

    What about tags and custom metadata? Are they getting overridden when uploading a new image with the same name?

  • Avatar
    Nadav Ofir

    Hi Nimrod,
    Yes, this information is being overridden.

  • Avatar
    Julbox Ltd

    Thank you Nadav,
    Is there any way to keep the information but update the image?

  • Avatar
    Nadav Ofir

    At the moment you will have to provide the tags & metadata within the upload request payload. I added a feature request on your behalf to support keeping the existing resource information. We'll make sure to update here once it becomes supported.

  • Avatar
    James Gillmore

    When I provide the public_id for linked images, the media library panel doesn't seem to be able to replace it. It creates a new image with the upload icon, and that image actually never appears. In short, the system doesn't seem to be prepared for this case, and the web panel has the bug of not properly indicating as such.

    Please correct me if I'm wrong. I'd love to be able to replace linked images with manually uploaded ones.

  • Avatar
    Nadav Ofir

    Hi James,

    Uploaded and Fetched resources do not collide and therefore cannot override one each-other. Furthermore, "fetched" resources cannot be set a name (it's automatically named after the URL from which it was fetched) and "uploaded" cannot be named with sequential slashes (e.g. "http://")

    If you wish some further advising regarding your use-case, please feel free to open a support ticket and share some more information on your requirements.

  • Avatar
    James Gillmore

    i found the solution: auto-upload, which is virtually the same thing as fetched, excepted better. My suggestion is you guys remove the fetched solution--it's redundant and not as good and as a result complicates things for the user.

    I also think you guys should lead more with this feature, i.e. in your marketing materials. I figured out you guys were the best in town for this sorta thing (compared to myriad competitors like cloudimage.io), but your homepage and main marketing pages barely made it clear that one of your features was the same thing that many companies like cloudimage.io do as their main offering. I feel like that's the most enticing way to get images into your platform these days. Just my 2 cents.

  • Avatar
    Nadav Ofir

    Hi James,
    Your 2 cents are very much appreciated, thank you for the feedback!
    Here's the relevant documentation and some comparison made between the two different features: http://cloudinary.com/documentation/fetch_remote_images

    Feel free to contact us for further advising if necessary :)

  • Avatar

    My experience is that I am getting the same version number over and over again when uploading images with the same public_id as with code below:

    let params = CLDUploadRequestParams(params: ["public_id":myID as AnyObject])
    cloudinary.createUploader().upload(data: data, uploadPreset: "xxxx", params: params, completionHandler: {}

    This is in Swift on iOS; might you shed light on the cause?



  • Avatar
    Nadav Ofir

    Hi Marcos,
    Make sure to use signed-upload protocol as the unsigned one doesn't allow overwriting existing images (for security reasons).
    See: https://support.cloudinary.com/hc/en-us/articles/208335975-How-safe-secure-is-it-to-use-unsigned-upload-from-web-browsers-or-mobile-clients-

  • Avatar
    Robert Lightfoot

    Using the Drag & Drop widget in the Cloudinary Media Library, how can I upload a new version of an image?
    e.g., I already have a file in Media Library, "sample.jpg"

    I want to replace that file with a newer version - so that only the version number (this part of the URL, /v9472981241) will change.

    But, when I drag & drop the new file (named that same as the already uploaded file, sample.jpg), the file gets uploaded and I end up with a file name like, "sample_vpbqfw.jpg"

    Is there a setting or something else that will allow me to be prompted when a 'duplicate' name exists, or that allows me to automatically update files is duplicate names exist?

    Thank you in advance for the assistance.

  • Avatar
    Maor Gariv

    Hi Robert,

    You can set the public_id of a drag&dropped image by clicking the "More upload options..." button and setting the public_id to the image you wish to change.

    Also, you can disable the random suffix characters when uploading - go to your account's Settings page and under Upload tab, choose Yes for "Use file name in Media Library"

  • Avatar

    I'm trying to update already existing image but unsuccessfully.
    So, I set public_id, enabled versioning in settings but when I try to update existing image - nothing happens.
    The image is still the same, the tags are still the same too.

    There are two part of my code (I work with Angular, but the common logic is similar):
    1) Init and calling uploader options:
    let uploaderOptions: FileUploaderOptions = {
    url: `//api.cloudinary.com/v1_1/` + ConfigurationConstants.CLOUDINARY_NAME + `/upload`,
    autoUpload: false,
    isHTML5: true,
    removeAfterUpload: true,
    additionalParameter: { crop: "fill", width: 120, height: 80 },
    headers: [{
    name: 'X-Requested-With',
    value: 'XMLHttpRequest'

    2) Part of setting options:
    setUploadingOptions(options: FileUploaderOptions): void {
    this.uploader = new FileUploader(options);

    this.uploader.onBuildItemForm = (fileItem: any, form: FormData): any => {
    form.append('upload_preset', ConfigurationConstants.CLOUDINARY_IR_PRESET);
    let tags = 'badge, ' + this.badgeForm.get('name').value;

    form.append('tags', tags);
    form.append('file', fileItem);
    form.append('public_id', 'wxcpebbq7hwlzoozukgf'); // just to test

    fileItem.withCredentials = false;

    return { fileItem, form };



    What I am doing wrong?

Please sign in to leave a comment.