web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Images refereed in rea...
Power Apps
Answered

Images refereed in react framework's CSS is not loading in PCF

(0) ShareShare
ReportReport
Posted on by 61

Hi,

I'm using a react component with PCF, the component uses primefaces library, and CSS, and it refers to some SVG images and some other assets. I tried manually referring the said assets in PCF manifest but it's not loading the images in the control, has anyone tried this before? am I missing some other configurations?

Many thanks 

 

I have the same question (0)
  • Verified answer
    Rick Wilson Profile Picture
    160 on at

    Could you please post how you referenced the resource files in your manifest file?  Also could you post a few of the places in the code where it references the resources.  My first guess is that it's a path issue.

     

    Rick

  • Nijos Profile Picture
    61 on at

    Hi

    I am using a CSS, that CSS refers to some icon assets through inline. I have 10's of assets that were referenced by the CSS library I use in my app, I could track the folder structure and put the assets in the relative path like the library originally did
    I referenced the manifest file like below

    <css path="CSS/primereact.min.css" order="2" />
    <css path="CSS/theme.css" order="2" />
    <css path="CSS/primeicons.css" order="2" />
    <img path="CSS/fonts/external-link.svg" />
    <img path="CSS/fonts/chevron-down.svg" />


    As you can see, I organised the assets folder relative to the way the CSS originally managed them, my PCF control is loading the CSS but not it's not picking the images.
    Many Thanks

    Nijo

     

     

  • Verified answer
    Danish N. Profile Picture
    186 on at

    Please post how they are referred in CSS. As @RAWilson suggested it may be the path issue. As both images and CSS are in same folder structure when referring them in css you will need font/external.svg

  • Nijos Profile Picture
    61 on at

    Hi,

    @RAWilson @PowerMaverick   Yes I got the issue in the CSS it was referred as  

     src:url('./fonts/primeicons.svg?#primeicons') format('svg');

    It is working when I changed to

     src: url('fonts/primeicons.svg?#primeicons') format('svg');

     

    Thank you.

    Nijo

  • eleung83 Profile Picture
    232 on at

    I'm not sure what the url() command returns, although I guess in your example it returns the correct url to the exact svg file. 

     

    From this older post here, it does seem like the official correct way to access these resources is by using the api getResource method discussed here. It may be there's a better way since then, but i've used a similar method for rendering png image resources.


Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 545 Most Valuable Professional

#2
Haque Profile Picture

Haque 314

#3
Kalathiya Profile Picture

Kalathiya 234 Super User 2026 Season 1

Last 30 days Overall leaderboard