Forum Discussion
How to use Images Stored in a SQL Server Table with Power BI
- 8 years ago
Yes you can. See this article https://blog.gbrueckl.at/2018/01/storing-images-powerbi-analysis-services-data-models/
I've found that the maximum length a string can have to be processed by Power BI is 32766 characters.
So once you've converted your image to a Base64 string, if the length of the string is greater than this then it will crop the image.
andy_scott42 seems to have it nailed. Whether or not you'll be able to use the techniques in this article will depend on how big your images will be (in Pixels) and how detailed
In the screenshot below .. the one I will probably mimic for my work is #3. Using Snagit, I take the image and resize it to something less than or equal to 100x100 pixels. I then resize the canvas to 105x105 pixes to give a border. I don't expect to need anything displayed in my visualizations that will be any bigger than that.
#1 is small and low resolution. Its too blurry and quite unappealing given the 4 bit color application
#2 is small and as a result - blurry
#3 will work fine (see description above). Its 9KB (well under the 32KB mentioned as the limit)
#4 is a big image with only 16 colors. The reduced color works for the most part, but that may not hold for other images
#5 illustrates what can happen to an image larger than 32kb
So -- think about how big your images really need to be for your reports/dashboards. Format in advance. If, at your target image size you're still over 32KB, then consider reducing resolution or color