Forum Discussion
how to package local images?
Hi,dm-p
the local resources can't package into *.pbiviz?
- dm-p5 years ago
Super User
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 [email protected] for further details, as they don't monitor these forums and may be able to provided you with more targeted info.
Good luck,
Daniel