Reputation: 97
I'm trying to link to or embed images which are stored in an azure BLOB storage container. I don't have any server side programming available, i.e. no C# or PHP, only HTML + JavaScript. Is this possible, and what technologies would you recommend?
I should also mention that my website does not run on the same server and is not running in Azure either.
Upvotes: 4
Views: 9093
Reputation: 136196
Since blob storage is accessible via HTTP protocol, you don't have to do any server side programming. Just ensure that the blob container containing images has Blob
or Container
ACL (See this answer of mine: Can't access the blob file in sub directory). After that you just have to use the URL of the image and put that in the src
attribute of the image and you're done!
So assuming your storage account name is myaccount
and blob container name is images
and the image name is logo.png
, the blob URL would be [http|https]://myaccount.blob.core.windows.net/images/logo.png
and that is something you would put in the src attribute:
<img src="[http|https]://myaccount.blob.core.windows.net/images/logo.png" />
Upvotes: 8