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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
lava_
Helper I
Helper I

How to use SVG image in JSON template file

I am trying to use an SVG image as the background image for my PBI report. I would like to include the image in the JSON theme file so when I create a new page in the report, it's automatically added.

 

What I did: I first converted the SVG image to JSON, which produced the below code. When I tried uploading the JSON file to Power BI, I got an error message. What am I doing wrong?

 

SVG image converted to JSON (using Aspose):

lava__0-1697482268819.pnglava__1-1697482307403.png

 

That code inserted into JSON code:

lava__2-1697482346398.png

 

Error message I receive from Power BI after importing the JSON file:

lava__3-1697482374444.png

 

1 ACCEPTED SOLUTION
lava_
Helper I
Helper I

I figured this out. I was making the mistake of converting the SVG image to JSON instead of base64. I didn't use an SVG URL, just an SVG image and didn't run into any issues when I imported the theme. 

Steps I took:

- Convert the SVG image to base64 (Data URI)

- insert that code into the JSON code

lava__1-1697558262209.png

 

 

 

View solution in original post

1 REPLY 1
lava_
Helper I
Helper I

I figured this out. I was making the mistake of converting the SVG image to JSON instead of base64. I didn't use an SVG URL, just an SVG image and didn't run into any issues when I imported the theme. 

Steps I took:

- Convert the SVG image to base64 (Data URI)

- insert that code into the JSON code

lava__1-1697558262209.png

 

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.