How to use Azure Storage Blob for Azure CDN

Azure storage blob is essential for the Azure CDN to work. When we upload an image to a CDN service it is linked to a storage unit. This storage unit stores the image and then storage blobs generate links to these images. A image which is hosted in CDN can be viewed using these links. It is a service that stores unstructured data in the cloud as object/clouds. These have cache control headers which means that we can assign Cache expiry date to these images. It can store any kind of data such as a document, images,videos. The storage blob is also known as object storage. Today I will be showing you how to upload an image to the azure storage blob and get the link so that we can view the image from CDN.

  • Download Azure Storage Explorer and Open it.
  • Once you open Azure Storage Explorer head over to add account. You can find the required details in your azure account about the special ID keys etc.

  • After adding the account you should have your containers appear. If nothing is there then you simply add one by clicking new. After doing that click on the blob I have named it as “images”.

  • After this we need to upload a image to our CDN service. Click on the blob and select upload.

  • After clicking upload we need to upload the image from our computer to the images container. Verify that image is correct by going to content select image and view it. You can also upload other file types.
  • Set the Cache Control to ‘3600’ or your desired value and update the properties.
Setting the Cache Control
Setting the Cache Control
Updating the properties
Updating the properties

Done! you have successfully uploaded images into CDN and now you can use the links which appear under Snapshot Qualified Storage Uri. If you have any issue pls do leave a comment below 🙂