GET http://localhost:4200/logo.jpeg 404 (Not Found) [closed]
GET http://localhost:4200/logo.jpeg 404 (Not Found) [closed]
Getting this error everytime I try to add image using in angular from my computer
This question appears to be off-topic. The users who voted to close gave this specific reason:
The image is not available, that's why! crosscheck whether your image is added or you misspelled the name
– V5NXT
Jul 2 at 7:25
@AnuradhaGunasekara probably is right. There is an assets folder which is intended to use for static content. Put your image in there and wehen you then call localhost:4200/assets/logo.jpeg it should work
– schlonzo
Jul 2 at 7:32
@AnuradhaGunasekara thanku , i am a beginner, i was just trying the reugular html syntax.
– Paras Rawat
Jul 2 at 7:41
1 Answer
1
Add the image to the assets folder.
|-assets
| ------ img
| ---------- user.jpg
And you can use that image in the template like this.
<div class="user-icon">
<img src="assets/img/user.jpg" alt="">
</div>
Did you add logo.jpeg to the assets folder? And Can you add the code where you are trying to get the image?
– Anuradha Gunasekara
Jul 2 at 7:23