none
Blob Storage of Image not accessible... RRS feed

  • Question

  • I just create a blob storage and uploaded some png images.

    In Azure Storage Explorer, I can see the images have image/png as content type.

    However, when I access the image via a url in a chrome or edge browser.

    I get this error

    This XML file does not appear to have any style information associated with it. The document tree is shown below.
    <Error>
    <Code>ResourceNotFound</Code>
    <Message>
    The specified resource does not exist. RequestId:ace48daa-301e-0089-57c3-821710000000 Time:2019-10-14T19:11:32.6144714Z
    </Message>
    </Error>

    Monday, October 14, 2019 7:23 PM

Answers

All replies

  • When you are using Storage explorer, you are logged in either using your credentials or using SAS(shared access signature). Whereas in browser, its an anonymous request. You need to change the access level for the images to anonymous before you can access them in the browser. If you want to access all the images within a container, you can give access to the container instead of giving it to all the images.

    By default, the access level on blobs is not anonymous, and you need to set it to anonymous explicitly.

    Follow this link for details -https://docs.microsoft.com/en-us/azure/storage/blobs/storage-manage-access-to-resources

    Hope it helps!


    - Vaibhav Gujral



    Monday, October 14, 2019 7:46 PM
  • @vaibhav

    Thank you for the information. I set anonymous public access in the azure storage explorer which did not take. I did it in the portal and it worked. Maybe a bug? Who knows. Thanks again.

    Monday, October 14, 2019 10:31 PM
  •  

    @ANeoh Thanks for letting us know that your issue fixed, however it's not a bug.  You should be able to access the setting from the Azure Management page by navigating to the storage account and container you're using. 

    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  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" />

    Kindly let us know if the above helps or you need further assistance on this issue.

    Wednesday, October 23, 2019 5:30 AM
    Moderator