In this guide, we will look at the steps for integrating ImageKit for images stored on any HTTP or HTTPS accessible web server. If you are looking to integrate ImageKit on a specific platform or with AWS S3 storage, we have specific guides for the following platforms and storages.
- AWS S3 Integration Guide
- Magento Integration Guide
- Shopify Integration Guide
- Wordpress Integration Guide
Steps for integrating ImageKit with any web server
1. Create an account if you have not registered already. While creating an account, choose an appropriate ImageKit ID, as it will be a unique identifier in your image urls.
2. Log in to your ImageKit dashboard and go to the integration section.
3. Add a new image origin by clicking on the "Add Origin" button.
4. To integrate ImageKit with the images on your server, you need to add your server as an origin for ImageKit. For this purpose, we need to set the origin type as "Web Server - HTTP(S) server and Magento, Shopify, Wordpress etc."
5. The value of base URL should be your web server's address with the protocol (http or https) in the beginning. It could be a domain name or an IP address with the protocol. If the image URLs begin with https://www.myhttpsserver.com/ then the base URL in the origin should also be the same. Click on Submit.
6. The first image origin that you add is automatically added to the list of origins accessible through the default URL endpoint i.e.
https://ik.imagekit.io/your_imagekitId you can modify this by editing "origin sequence". You can either continue to use the “Default URL endpoint” or create a new URL endpoint if you want to manage multiple image origins with ImageKit.
7. Now, let's quickly verify if the images from your web server are accessible via ImageKit.
For example, if the image URL on your web server is:
You will need to replace <your_imagekitId> with your own ImageKit ID.
If the above change does not work for your images, then you can get in touch with our team to help you with the integration by creating a support ticket from your ImageKit dashboard.
After performing the above steps, ImageKit does not start downloading objects from the web server to optimize images. Whenever you request an image on you webserver, using an ImageKit URL and when the image is not available in ImageKit’s storage, only then will it get the image from your web server. Image optimization and transformation is done in real time.
Now that you have successfully configured ImageKit to fetch images from your server, you might want to understand image url construction in ImageKit.
In case you have any questions, please create a support ticket from your dashboard or if you are on a paid plan, start a conversation by clicking on the chat icon in the bottom right.