Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
sharm3a
New Member

I want to add images in assets to powerBI Customvisual

am creating a custom visual and integrating it with powerBI. I am using a library to use custom components, this library has its images and fonts, and so on and so forth. I create a build of the angular component and use it in a custom visual. After rendering the images do not appear, in a way it does not map the local images in that manner pibiviz JSON.

Is there any solution out there so that we can include images in Powerbi, from the component whose build we are using?

I tried using Webpack to bundle my images in assets and show them up there, didn't work. Referring to the images in CSS does work but I don't want to use it that way, also no external hosting of images

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @sharm3a,

 

If you're using powerbi-visuals-tools without any further customization, then the CSS approach is likely going to work best for you. I personally use this without any issues and have no need to go beyond this for my use cases (I'm using a combination of my own images and Fluent UI for MS-style icons).

 

If you want to load images into the package via JS, you'll likely need to introduce and maintain your own custom Webpack configuration using powerbi-visuals-webpack-plugin and configure any loaders accordingly to use them in import statements.

 

Regards,

 

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

1 REPLY 1
dm-p
Super User
Super User

Hi @sharm3a,

 

If you're using powerbi-visuals-tools without any further customization, then the CSS approach is likely going to work best for you. I personally use this without any issues and have no need to go beyond this for my use cases (I'm using a combination of my own images and Fluent UI for MS-style icons).

 

If you want to load images into the package via JS, you'll likely need to introduce and maintain your own custom Webpack configuration using powerbi-visuals-webpack-plugin and configure any loaders accordingly to use them in import statements.

 

Regards,

 

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.