Reputation: 357
I'm trying write the path of the local images into the project and It seems to show me an undefined image.
as you can see I'm in the app.component.html I want to make
src="img/profile.png"
but in the browser I get this error
profile.png Failed to load resource: the server responded with a status of 404 (Not Found)
do I wrong with the path?
Upvotes: 0
Views: 1853
Reputation: 357
I found solution for that works. I just move the folder img to assets and then I write this line
src="assets/img/profile.png"
Upvotes: 3
Reputation: 3484
You need to create this img
folder in assets which is out of src
folder. And then try to use that path like below
<img src="./assets/img/profile.png">
Upvotes: 4