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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
mmattar
Frequent Visitor

Base64 Images

Hello,

 

I have searched endlessly for this solution and every thread seems to go into a dead end. 

 

I would like to know how to show images that are already encoded in Base64. I have a PowerApp that can take pictures and stores the image data(format) in a SP list. The results from the PowerApp to the SP list for an image are "data:image/jpeg;base64,/.... I am using PowerBi desktop and my images do not display. Can anyone help ? pbi3.PNGpbi4.PNG

Thanks !

2 ACCEPTED SOLUTIONS

Hi @mmattar ,

Actually, PowerBI has a limitation in the size of Base64 column, but I haven't found a document describing this. Besides, we can't find a method to reduce the size of Base64, you can consider reduce the quality of image and convert it to Base64 again.

As a workaround, we can upload the image to server, then use the image url to display it.

Best Regards,

Teige

View solution in original post

Hi @mmattar ,

Some Online storage provider like Azure or Onedrive can provide the web url for a picture, https://www.fourmoo.com/2017/09/26/power-bi-using-onedrive-to-embed-and-host-images-for-power-bi/

Best Regards,

Teige

View solution in original post

16 REPLIES 16
ChrisWilliams
Advocate II
Advocate II

Hi, I'm a custom control developer.

 

My product, Image Pro, is one of the most popular options for displaying Base64 image data.  And Image Pro is a certified visual.

What is the limitation for displaying large files i.e when Base64 doesn't fit into Power BI column (over ~30k characters)? Or do you have a visual that can display pdf (up to 400kB)

 

Using the approach in Chris Webb's blog, you can split the file into smaller chunks, each of which are less than 32,000 bytes.  Then you create a measure that combines the chunks, as shown in his blog.

 

You can download the sample pbix of Image Pro from AppSource which shows how this works. The background images are stored in chunks as they are over 32,000 bytes.

Vladisam
Helper II
Helper II
Anonymous
Not applicable

Hi ,

 

You can do in power BI but their is limitation

Add you r convert column image base64code

And In Power BI  Desktop Model.Data,andDesign tab click the Data tab abd change the image base64code column  Data catogert as Image URL after that take one grod and add the image base64code column , limitation is image size big image cant display

mmattar
Frequent Visitor

I read that if the encoded Base64 column reaches max limit that the image does not show in full, this just happened to me, i see the image but its cut off. anyway to shorten the Base64 format to view the whole image ? 

Hi @mmattar ,

Actually, PowerBI has a limitation in the size of Base64 column, but I haven't found a document describing this. Besides, we can't find a method to reduce the size of Base64, you can consider reduce the quality of image and convert it to Base64 again.

As a workaround, we can upload the image to server, then use the image url to display it.

Best Regards,

Teige

Hi @TeigeGao , can you elborate a bit more on "we can upload the image to server, then use the image url to display it" 

Thanks

Hi @mmattar ,

Some Online storage provider like Azure or Onedrive can provide the web url for a picture, https://www.fourmoo.com/2017/09/26/power-bi-using-onedrive-to-embed-and-host-images-for-power-bi/

Best Regards,

Teige

guh950
Microsoft Employee
Microsoft Employee

How would I do something like this programmatically through Power BI's power query editor for a OneDrive Folder?

 

Currently, I created a custom column to convert the image to Base64, and ran into the clipping issue mentioned above, and I created a custom column that concatinated the file name and folder path and applied the picutre url category to it, but to no avail. So short of going into the image folder and manually resizing each image one by one, and testing until unclipped, I'm not sure if there's a way to auto generate the embedded url for each image. I'm all about saving time haha.

I am using simple PowerApp (really, document library and specifically pdf viewer) as a visual in PowerBI to display base64 stored on Sharepoint. I am passing document ID from PowerBI to PowerApp visual, and document is displayed in PBI

I used this video:
https://www.youtube.com/watch?v=GFfAkk3g1y8

guh950
Microsoft Employee
Microsoft Employee

I just viewed that video, it looks promising but its connecting to Power App, so to make sure I got the concept generally correct, the unlimited character base64 would fully populate in Power BI without needing to break up the base64 images into chunks, and without having to do resizing tomfoolery with the images before converting to base64 and storing as a link in PBI?

 

Also, how did you get the connection to PBI? Was it from the Power App or directly from sharepoint?

Sharepoint does not have limitation of 32k characters, not sure if this is an issue for you too or just for initiator of the thread (base64 there was on Sharepoint). PowerApp also does not have this limitation. I have a table in PBI which maps SP list ID to the document, and this is what I pass to from PBI to PowerApp. Gallery in PowerApp has SP list as a source, and ThisItem is constructed using input from PBI to get path to the item you want to see.
You build PowerApp launching it from PBI (i.e you add visual, drag fields you need, and this will start the process, and you add SP as a source to PA). Both PBI and PApp need access to SP.

the character limit for a string is 32,766, anyways of reducing ? 

guh950
Microsoft Employee
Microsoft Employee

I believe so. Now if only I can get my image sizes standardized so base64 will always fit in the column.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors