Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

276
Views
Angular library img src

I am looking for a way to put images in the Angular Component Library. I mean img[src]. As for background-image, the library finds images from the assets folder, but if I try to attach images to img[src], it doesn't work. I also tried different src paths, absolute and relative. I know the base64 way, but is there anything else? I'm using Angular v12 and my ng-package.json looks like below:

  "assets": [
    "/assets/**/*",
    "/styles.scss",
    "/styles/**/*.scss"
  ]

In angular project below code works just fine:

<img src="/assets/img/foo.jpg"> 

but it does NOT work in angular library

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!