Assets/Images not being served...
Versions
Angular CLI: 1.6.6
Node: 6.9.4
OS: win32 x64
Angular: 5.2.2
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.6.6
@angular-devkit/build-optimizer: 0.0.42
@angular-devkit/core: 0.0.29
@angular-devkit/schematics: 0.0.52
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.6
@schematics/angular: 0.1.17
typescript: 2.5.3
webpack: 3.10.0
Repro steps
- add any image to /src/assets/images/
- reference image in HTML
- ng serve
Observed behavior
image is not found Request URL:http://localhost:4200/assets/images/logo.png Request Method:GET Status Code:404 Not Found
I have made sure that my angular-cli.json lists the assets folder...
Assets folder directly under src directory
HTML is typical
<img src="./assets/images/logo.png"/>
Image is 404

Here is a minimal example... https://github.com/smatthews1999/testng
I am having the same problem :/ I tried with the latest version and still doesn't work!
@smatthews1999 <img src="assets/images/ic_launcher.png"> It ran successfully for me.
It's after the packs are updated npm update
I can attach an icon
Need verify package versions
@smatthews1999 Try increasing the dimensions of the image in paint. I had an image in the path src/assets/Library/Images with dimensions 60 x 45 which did not load and an image with dimensions 225 x 225 which loaded successfully. Hope this helps !
if img convert to base64? then his break in file system. Need verify css file
@smatthews1999 Have u found out a solution to u'r problem, I face the same problem while I was trying to render the image, It was giving me the same error as 404 Not Found. I have tried alt+click on the path of the image and it took me to the image on my vscode. But don't know why it's not able find the image on browser. Anyone please help !!!
Here is the version of angular cli and browser-platform

I am having the same issue,
Angular CLI: 6.0.8 Node: 8.11.2 OS: win32 x64 Angular: 6.0.4
@aajmot I thought I should downgrade to 1.6.3 to overcome, Luckily found out a solution without downgrading, just remove all the symbols, brackets for all your folders starting from particular drive. If u'r project is in E drive follow below change this location
E:\Data\project - 1\Angular(learning)\app
to
E:\Data\project1\Angularlearning\app
U will be able to see the loaded assets folder to the browser under sources tab in chrome developer tools
the way i have done it is by creating assets folder in each component and inside it created an images and then placed the images that are need for that particular component, then importing the images from same component folder and it works
Can you try using the binding..
<img [src]="assets/images/ic_launcher.png">
I tried the solution @avinashdv proposed and it worked. You need to make sure all the folders of your project's path have no : [] or "." in them my project was [BYCK][1.0] when I turned it into BYCK_10 it worked .
I am still having this issues. There are no special characters in my file path except "_", image is inside assets/img folder. I see it in the dist for prod build, but local dev server isn't serving it up.
Figured it out, apparently file names are case sensitive.
@PTC-JoshuaMatthews Glad it helped
Try increasing the width and height of the image. It worked for me
Assets not loading after --prod build and then deployed to firebase? all styles font etc work, just not images?? assets folder only?? everything works fine on local server. All other projects deployed successfully in the past? this project is giving me grief! ng v 6.1.0 I have no errors???
@alvics I'm getting same issues here. can't load images of assets folders properly when deployed to firebase. on local machine works perfects. Trying to solve this, but i think ill have to back to prior cli version.
@paulimfavarato let me know how you go? I still trying! no luck, try some tests?? It use to be easy not sure what there doing with the CLI? :(
@alvics no lucky yet. posted on stackoverflow too https://stackoverflow.com/questions/51853387/angular-6-build-cant-load-images-on-firebase-hosting