Notifications
Announcements
Hi,
I am in process of creating a Component for PowerApps. For which i need to have few images which are refernced in my CSS file. How do i import the full image folder so all my CSS reference images can be seen in component.
Hi @GLMSDev
I am writing a component using the Typescript. In which I have Images Folder. which I would like to load it into Component.
You can place images in a folder and refer to its relative location from the css.
The (Webpack) npm run build command should automatically pack it up for you, and it should resolve at runtime.
I am currently doing by converting the images in base 64 formats as shown below,I have tried many different ways but was not successful
Do you have some sort of article or code example for it. Because i have done it but it did not take and not showing image
https://stackoverflow.com/questions/19204674/how-do-i-display-an-image-via-css-in-my-local-environment has a good quick overview of how to display an image referenced within a css style using paths relative to where the css file was.
To explicitly call display an image in your image directory within an image tax not using a relative path the end directory is something like https://site.crm?.dynamics.com/%7b636952333030005424%7d/webresources/cc_namespace.constructor/images/file.jpg
where the namespace and constructor comes from the information in the control manifest and the picture is file.jpg stored in the images folder.
The one thing I don't know is how consistent the seemingly random parent path /%7b636952333030005424%7d/ is across environments.
hi ben,
Regarding 'The one thing I don't know is how consistent the seemingly random parent path /%7b636952333030005424%7d/ is across environments. '
We actually have exposed the API,
I had a similar Issue here : https://powerusers.microsoft.com/t5/PowerApps-Component-Framework/Subfolder-for-css-resources/m-p/286523
For now, the resources doesn't build the folder structure: they are flattened into the output folder.
Maybe you get to see your images referenced in the css, if the images are in the same folder as the css files. This worked for me. It seems that this will be fixed in the future.
Best regards,
Diana
Hi
I have added the images in css folder and referenced them in css accordingly. when i run the "npm start " i can see the images. however, when i try and upload the same component. and then use them. these images are not available.
after uploading it to css folder. do i need to call those images using the code ? if so, how do i reference them in css. ???
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 796 Most Valuable Professional
Michael E. Gernaey 327 Super User 2025 Season 2
Power Platform 1919 268