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.
Go to the integration section of your ImageKit.io dashboard and click on the "Add origin" button.
Give your origin a name, it will appear in the list of origins you have added. For example - Website load balancer.
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.com as the base URL.
Leave the advanced options as it is, for now.
Click on Submit button.
The newly added origin will start appearing under image origin list in the integration section of ImageKit.io dashboard. Similarly, you can add multiple origins to the same account.
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-from with its value set to
Below is a list of IP addresses currently used by ImageKit.io to fetch images from your origin:
Let's assume the original image URL is
https://www.example.com/rest-of-the-path.jpg. The same image can be accessed through ImageKit.io default URL-endpoint now -
We just replaced the old base URL
https://www.example.com with the new ImageKit.io URL-endpoint, i.e.,
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.com as the base URL for canonical header, then the image response for URL
https://ik.imagekit.io/your_imagekit_id/rest-of-the-path.jpg will 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