c# - Why don't the images don't show up on my ASP.Net core website? -
i have asp.net core web application , want add photos when try debug on iis express, image icon shows , i'm not quite sure do. of images jpg's , in folder inside of wwwroot folder. how reference photos:
<img src="~/images/picture.jpg" />
i not sure make photos show up.
make sure allowing static files served:
public void configure(iapplicationbuilder app, ihostingenvironment env, iloggerfactory loggerfactory) { app.usestaticfiles(); }
you can read more here: https://docs.asp.net/en/latest/fundamentals/static-files.html
Comments
Post a Comment