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 overriding the old one. However, if the original (older) image was already accessed, it might get cached in the CDN. Therefore if you access the exact same URL, you might be still getting a CDN cached version rather than the new updated one.
We recommend to include the version component as part of the URL in order to bypass CDN cached version and to force the delivery of the newest image. Cloudinary returns the updated value of the
version parameter as the part of every upload response. The
url parameter is also returned which already includes the
version component with the updated value.
For more information:
Alternatively, when using the 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.
Also, note that in default Cloudinary invalidates URLs which do not include the version component. If you wish to invalidate "versioned" URLs, you should enable 'Invalidate versioned URLs' in your account's Upload settings page.
Another option you might want to consider is to add a unique suffix to the public ID with every re-upload.