cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
luojiandan_bi
Helper I
Helper I

how to package local images?

can I use local image in custom visual?I do like this:

001.png

but get error,because <iframe>/<sand-box>.

002.png

I‘m new developer of powerbi custom visual,can I use local image(finnaly package in visual) in custom visual?

@dm-p 

 

 

2 REPLIES 2
luojiandan_bi
Helper I
Helper I

Hi,@dm-p 

the local resources can't package into *.pbiviz?

Hi @luojiandan_bi,

I personally haven't tried it this way - it looks like Webpack will not recognise the variable assignment as a file and skip over it.

When working with images, I tend to declare them as CSS classes I can use in the visual.less file, and these get encoded when the visual is packaged. They're much easier to work with in the DOM too this way, IMHO. Here's an example of how I do it for Deneb.

If this approach doesn't work for you, I'd advise either creating an issue in the powerbi-visuals-tools Github project  or contacting the team at pbicvsupport@microsoft.com for further details, as they don't monitor these forums and may be able to provided you with more targeted info.

Good luck,

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
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors