I am in search of a solution to include images within the Angular Component Library using img[src]. The library successfully locates images from the assets folder for background-image, but when attempting to insert images into img[src], it seems to encounter issues. I have experimented with various src paths, both absolute and relative, without success. While I am aware of the base64 method, I am curious if there are other alternatives available. My Angular version is v12 and the structure of my ng-package.json appears as follows:
"assets": [
"/assets/**/*",
"/styles.scss",
"/styles/**/*.scss"
]
The code snippet below functions properly in an angular project:
<img src="/assets/img/foo.jpg">
However, this same code does NOT work in an angular library.