1
votes

I published my azure website (asp.net with c# controller) as a WebApp but when I call the website there are no picture.

If I deploy the website on LocalHost I can see the picture.

        <img class="img-responsive" style="height:90%;width:90%" src="../Content/images/test.png" />

I also tried to change the path to:

src="~/Content/images/test.png" /

src="/Content/images/test.png" /

But after uploading the webapp I cannot see any picture.

In other question I read that I have to use Azure Blob Storage. But I just have a few (ca. 5 picture) on my website. Maybe there is a simpler way?

Or is it possible to upload the file and create the image folder in the azure portal?

2
Can you share the link of your web application?Gaurav Mantri
Hi, the link to the Web Application: websitetestbf.azurewebsites.net on the main site there are 3 pictureBenjamin Benjamin
Blob storage is not a requirement for storing images. Have you verified that your image was even deployed? Have you looked at yourwebsite.scm.azurewebsites.net and browsed your uploaded content (which will be in d:\home\site) to see if your images are there where expected?David Makogon
Indeed, checking if issue is runtime or deployment time is the first step. See this article.David Ebbo
i think its because the images folder is not created after publishing. just drag and drop a file in to this folder in your visual studio. then publish the images will appear. having a file in the folder tells visual studio that this folder needs to be publishedSujit.Warrier

2 Answers

1
votes

i think its because the images folder is not created after publishing. just drag and drop a file in to this folder in your visual studio. then publish the images will appear. having a file in the folder tells visual studio that this folder needs to be published

0
votes

Right click on image folder of the project and Include in project did the trick for me, earlier it was excluded from the project.