I\'m pretty new to Angular so I\'m not sure the best practice to do this.
I used angular-cli and ng new some-project to generate a new app.
ng new some-project
In
1 . Add this line on top in component.
declare var require: any
2 . add this line in your component class.
imgname= require("../images/imgname.png");
add this 'imgname' in img src tag on html page.