Caches provides two ways to deliver images for your website - from the media library, or your server/storage. Each of these image sources follow certain caching rules pre-determined by Additionally, you can define your own caching rules, if needed.

Default Caching Rules

  1. 1.
    The original copies of the images and files are stored permanently within the Media library when using the Media Library to store and deliver the images.
  2. 2.
    When using your server or storage as an origin to deliver images, the original copies of the images and files stay within your servers, and does not control how long the files remain there. maintains a copy of your original image within its internal caches and performs all the optimizations on this copy of the original.
  3. 3.
    The transformed and optimized copies of the images and files, when requested via a URL, are usually stored permanently. This not only improves the performance for repeat requests, but ensures the number of requests made to your origin server or storage is less. However, might change this practice for a specific account or all accounts, if and when necessary.
  4. 4.
    Every image URL is cached at the CDN, and other internal caches, for a maximum of 180 days. This is done to ensure fast delivery of images across the globe.
You are not billed for the storage consumed by the original, transformed, and optimized copies of the files, or even files that are explicitly uploaded to the media library as long as you respect the Fair Usage of Storage Policy which is described on's pricing page.

User-Defined Caching

Cache-control time can be modified for the files that are being delivered from your storage or server attached to, but not for the files stored within the Media library.

Origin-Based Cache Control

This option allows caching based on the cache control headers being passed from your origin attached to For example, if your origin (server or storage) sends a cache-control header to cache a file for 1 hour, applies the cache-control header across all its internal caches, generated transformations, and CDN. This ensures that the cache control set by you is obeyed at all times.
This feature can be applied for any URL endpoint in your ImageKit account.
Note: Origin-Based Cache Control is disabled by default. Reach out to ImageKit's support team to enable it for your account.

Internal Caching caches a copy of every transformed and optimized image at the CDN. Additionally, also maintains its internal caches, which are co-located with its processing engine across 6 global locations. In case any URL is missed by the CDN, internal caches deliver the resources without passing on the request to your server or storage. The same process is followed when you integrate with a custom CDN.