Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
As we all know, one of the few ways (maybe the only way) to display local images in Power BI is to convert the images to base64 code. But there is a restriction for the image size. Displaying images which are sightly greater than 25kb, say 35kb, you will only get part of it. For those with a size greater than maybe 50kb, the image will be crashed. The problem is, images can easily goes larger than 25kb.
I solve this problem by developing a tool to batch reduce the image size to lower than 25kb and then convert them to base64 code.
Please download the tool from this link https://1drv.ms/u/s!Amq0yNjgQSmjsGwl9YU6DC7pTvga?e=znuENP to any directory.
User Guide:
1, Extract the zip file, and open the Img2Base64-en.exe under the dist folder.
2, After a few seconds you will be required to enter your target directory. Copy the directory path and paste it into the above form and then click "Enter" button. Notice that you can have any types of files in the directory, such as .doc, or .xlsx, but only the .jpg, .png and .jpeg files will be converted.
3, After a few seconds, the form will be shut-off automatically. And a b64.csv file is generated in the dist folder. This file contains only two columns, one is the name of your images, the other is the base64 codes for each image.
4, Import the b64.csv file into PowerBI, and now the local images are all compacted and imported to PowerBI. Set column base64's data category to Image URL, then let's enjoy it.
Solved! Go to Solution.
Hi @btharp ,
Great post, believe that this coul be a good post to place on the blog.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsGREAT !!
I'm just looking for solution of how to display local image, you saved me lot of time.
Thank you for your sharing.
HELP!!
i cant see Img2Base64-en.exe after unzupping the zip folder, i cant only see Img2Base64-en.exe.manifest and other TOC,PYZ and another zip file.
i have found the Img2Base64-en.exe under the dist folder but after clicking it a message comes saying
"Winwodws cannot find C:/....................Img2Base64-en.exe" make sure you typed the name correctly, and then try again"
after that the Img2Base64-en.exe gets deleted by it self
can you upload a screenshot of that message?
This is awesome. This post should have more views as I see a lot of people struggling with batch conversions.
Thanks.
Hi @btharp ,
Great post, believe that this coul be a good post to place on the blog.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |