Any web server which is accessible over HTTP or HTTPS can be configured as an origin in ImageKit.io. This allows you to use ImageKit.io's real-time image optimization and transformation features on all existing images.
Note: We do not start copying images from your server as soon as you add it. Instead, we will fetch the particular image when you request it through ImageKit.io URL-endpoint. Learn more to understand how this works. The images accessed from this origin will not appear in your Media library.
- 1.Go to the external storage section in your ImageKit.io dashboard, and under the Origins section, click on the "Add origin" button.
- 2.Choose Web server from the origin type dropdown.
- 3.Give your origin a name, it will appear in the list of origins you have added. For example - Website load balancer.
- 4.Fill out the base URL, for example, if your current image URL is
https://www.example.com/rest-of-the-path.jpg, then enter
https://www.example.comas the base URL.
- 6.Click on Submit button.
Whitelist request from ImageKit.io ****Make sure that your web-server is accessible from ImageKit.io. Learn more.
When you add your first origin in the dashboard, the origin is by default made accessible through the default URL-endpoint of your ImageKit.io account. For subsequent origins, you can either create a separate URL-endpoint or edit existing URL-endpoint (including default) and make this newly added origin accessible by editing the origin preference list.
Let's look at a few examples to fetch the images:
- The same master image using ImageKit.io URL-endpoint ****https://ik.imagekit.io/your_imagekit_id/rest-of-the-path.jpg
- Resized 300x300 image ****https://ik.imagekit.io/your_imagekit_id/
So when you request
https://ik.imagekit.io/your_imagekit_id/rest-of-the-path.jpg, ImageKit.io internally fetches the file from
URL-endpoint transformation image path
Now start using ImageKit.io URL endpoint in your application to accelerate image loading.
Get started with our quick start guides and SDKs:
Learn about real-time image resizing:
When enabled, the image response contains a Link header with the appropriate URL and rel=canonical. You will have to specify the base URL for the canonical header.
For example, if you set
https://www.example.comas the base URL for canonical header, then the image response for URL
https://ik.imagekit.io/your_imagekit_id/rest-of-the-path.jpgwill have a Link header like this:
Link: <https://www.example.com/rest-of-the-path.jpg>; rel="canonical"
By default, when ImageKit.io tries to get the image from your origin, the value of the Host header is the same as the base URL specified for the origin. For example, if the base URL is https://www.example.com, then the same gets forward to your origin.
However, when this setting is enabled, the host value from the image URL will be forwarded to the origin as the Host header. For example, if you are using a custom domain name for your image URLs, like
static.example.com, then that is what gets forwarded to your host instead of
If you have deployed a WAF, you need to whitelist requests coming from ImageKit.io servers.
We recommend you to whitelist our requests to your origin based on request header value. All our requests to your origin will have a header
x-req-fromwith its value set to
Below is a list of IP addresses currently used by ImageKit.io to fetch images from your origin:
Note that these IP addresses are subject to change in the future. Any changes will be reflected and updated in this document.