Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
can I use local image in custom visual?I do like this:
but get error,because <iframe>/<sand-box>.
I‘m new developer of powerbi custom visual,can I use local image(finnaly package in visual) in custom visual?
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
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.