Accounts created before Nov. 1st, 2021
Accounts created before November 1, 2021 have to include /v7/ in the path, like shown below.
//token.cloudimg.io/v7/original_image_url?operations&filters
Accounts created on or after November 1, 2021 do not require /v7/ and documentation have been updated accordingly.
To verify the type of configuration on your Cloudimage account, log in to your Cloudimage admin panel and look at the syntax provided on the Welcome page.
[NOTE] If you are an existing Cloudimage customer and wish to be able to remove the v7 from your URL syntax, please contact our support.
Headers:
X-Client-Key: your_API_KEY
Content-Type: application/json
Body:
The body of the request must contain the invalidation url in the form /original_image_url?operation&filter.
To invalidate: https://doc.cloudimg.io/sample.li/boat.jpg?width=300
Use: /sample.li/boat.jpg?width=300 or v7/sample.li/boat.jpg?width=300
Invalidate multiple images
{
"scope": "urls",
"urls": ["/sample.li/paris.jpg?width=400",
"/sample.li/flat.jpg?width=400", ...
]
}
Invalidate multiple images with all their resizes
{
"scope": "original",
"urls": ["/sample.li/birds.jpg",
"/sample.li/boat.jpg", ...
]
}
Invalidate URLs with wildcards
{
"scope": "original",
"urls": ["/sample.li/avatars/*",
"/sample.li/profile_pics/*", ...
]
}
The example above will invalidate all URLs starting with either /sample.li/avatars/
or /sample.li/profile_pics/
.
Invalidate only specific transformations
{
"scope": "original",
"urls": ["/sample.li/birds.jpg",
"/sample.li/boat.jpg", ...
],
"transformations": ["?w=200",
"?force_format=jpg", ...
]
}
The example above will invalidate all variants of the listed images which are either resized to w=200 or forced to deliver jpeg compression.
Original flushes require the entire log database to be searched, hence can take longer (up to 60 seconds)
Flushing all images will result in Cloudimage downloading all your images from your origin image storage again. This will result in slower image loading times for the first times the images are downloaded. Contact us if you have more than 1 TB of monthly CDN traffic or 1 TB of storage.
Try it out with the doc token doc
You can use our sample image showing the time it is resized the first time:
https://doc.cloudimg.io/sample.li/now.php?width=500
Click on 'Send' to call the Invalidation API and reload the image above (invalidation takes about 30 seconds to complete). You should see the new time. You might need to disable your browser's local cache to see the new image immediately.