Reputation: 120
I am a newbie in asp.net. I m trying to add a logo in my _layout.cshtml file but it's not getting into view. It's showing a broken image. The image is in Assets folder. Don't know what I am doing wrong. Any help would be appreciated.
Here's the screenshot of my code and structure.
Upvotes: 1
Views: 1352
Reputation: 30016
For static files in asp.net core, you need to place them in wwwroot
folder in your project by default.
Follow steps below:
Assets
folder to wwwroot
Change the html code like:
<img src="~/Assets/logo.png" />
Upvotes: 3