How to display an image from a path in asp.net MVC 4 and Razor view?

Solution 1:

In your View try like this

  <img src= "@Url.Content(Model.ImagePath)" alt="Image" />

Solution 2:

you can also try with this answer :

 <img src="~/Content/img/@Html.DisplayFor(model =>model.ImagePath)" style="height:200px;width:200px;"/>

Solution 3:

Try this ,

<img src= "@Url.Content(Model.ImagePath)" alt="Sample Image" style="height:50px;width:100px;"/>

(or)

<img src="~/Content/img/@Url.Content(model =>model.ImagePath)" style="height:50px;width:100px;"/>