Azure Blob storage
You can configure ImageKit.io to fetch images from your Azure blob storage. This allows you to start leveraging ImageKit.io real-time image resizing, optimization, and fast CDN delivery for thousands or millions of existing images within minutes.
The following tutorial will help you create a Shared Access Signature (SAS) token that will allow ImageKit to access the images in your Azure storage container. This allows you to restrict ImageKit to only reading objects from your container. i.e. ImageKit will not be able to create/delete/update objects in your container.
- 2.Select Storage Accounts.
- 3.Select the corresponding storage account.
- 4.Search for the Shared Access Signature setting in the settings pane on the left.
- 5.Now, select the options as shown in the following image. This ensures that ImageKit is allowed to only read images from your Azure container.
- 6.Enter an End expiry time that is practically infinite. Preferably, enter a time 10 years from the start time (which should be right now)
- 7.Click on 'Generate SAS and connection string'
- 8.Note down the SAS token generated. It should be of the format
Options for creating a SAS token
We have now created a SAS token for ImageKit and granted it the Read permission for your container, which means that ImageKit can do nothing more than just read objects in your container. At this point, you should have the following values with you:
- **Azure storage account name: **The name of your storage account.
- **Azure storage container name: **Name of the container that you want to integrate.
- **SAS Token: **As generated in step 1. Do note that the SAS token should begin with a
?when adding it with the origin in ImageKit. For example -
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 the 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:
So when you request
https://ik.imagekit.io/your_imagekit_id/rest-of-the-path.jpg, ImageKit.io uses the SAS token provided by you to fetch the original image from the path
rest-of-the-path.jpgin the Azure container using the official Azure SDK.
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: