How to show image in Blazor view

blazor

Question

I am trying show images in a Blazor view, but it's not working and shows only an image icon:

<img src="~/Images/watch.jpg" asp-append-version="true" width="300px" />

Here my image resides in this path wwwroot/Images/watch.jpg

1
3
9/4/2018 3:44:29 PM

Popular Answer

Try this:

 <img src="/Images/watch.jpg" asp-append-version="true" width="300px" />
7
9/2/2018 10:35:22 AM


Related Questions





Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow