Reply
Mousemo
New Member
Partially syndicated - Outbound

PowerBi Images don't display

I'm having problems getting local network images to display.  I can get a static network image (via Insert - Image) and Web URL images to display fine but any network image in a Table/Multirow card, card, or using the Simple Image visual doesn't display.  I've tried using the local C: drive or a networked drive and they don't display.  Attached is a sample of the PowerBi page, you can see the Web URL and Static images are fine but the others are not.  I've made sure those are set as Image URL and tried a couple of different file path formats.

 

Any ideas to get these images to display?


Thanks

 

Filepath2.pngFilepath.pngImages.png

1 ACCEPTED SOLUTION
v-jianpeng-msft
Community Support
Community Support

Syndicated - Outbound

Your ideas is so great @hnguy71 

Hi, @Mousemo 

You can work with your photos by following the steps below:

First, there is an image folder in my local directory:

vjianpengmsft_0-1719981384848.png

We need to follow these steps in Power BI:
Start by importing a folder in Power BI:

vjianpengmsft_1-1719981416913.png

vjianpengmsft_2-1719981424364.png

vjianpengmsft_3-1719981438221.png

vjianpengmsft_4-1719981451653.png

 

 

Convert this column to a text type:

vjianpengmsft_5-1719981478765.png

vjianpengmsft_6-1719981487162.png

Add a custom column:

vjianpengmsft_7-1719981518315.png

Enter the following expression:

"data:image/" & [Extension] & ";"&"base64,"& [Content]

vjianpengmsft_8-1719981563054.png

vjianpengmsft_9-1719981571275.png

Go back to Power BI and use this custom column:

vjianpengmsft_10-1719981593797.png

vjianpengmsft_11-1719981600226.png

Use this custom column in the table visual:

vjianpengmsft_12-1719981629336.png

vjianpengmsft_13-1719981636503.png

 

 

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

View solution in original post

6 REPLIES 6
v-jianpeng-msft
Community Support
Community Support

Syndicated - Outbound

Your ideas is so great @hnguy71 

Hi, @Mousemo 

You can work with your photos by following the steps below:

First, there is an image folder in my local directory:

vjianpengmsft_0-1719981384848.png

We need to follow these steps in Power BI:
Start by importing a folder in Power BI:

vjianpengmsft_1-1719981416913.png

vjianpengmsft_2-1719981424364.png

vjianpengmsft_3-1719981438221.png

vjianpengmsft_4-1719981451653.png

 

 

Convert this column to a text type:

vjianpengmsft_5-1719981478765.png

vjianpengmsft_6-1719981487162.png

Add a custom column:

vjianpengmsft_7-1719981518315.png

Enter the following expression:

"data:image/" & [Extension] & ";"&"base64,"& [Content]

vjianpengmsft_8-1719981563054.png

vjianpengmsft_9-1719981571275.png

Go back to Power BI and use this custom column:

vjianpengmsft_10-1719981593797.png

vjianpengmsft_11-1719981600226.png

Use this custom column in the table visual:

vjianpengmsft_12-1719981629336.png

vjianpengmsft_13-1719981636503.png

 

 

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

hnguy71
Super User
Super User

Syndicated - Outbound

hi @Mousemo ,
For any local files you'll need to convert them to base64 format, but before that you'll need to further determine if source is local or web.

Once you've determined if source is local then you'll need to create a new column with the following code:

 

 

 

        let 
            binary = [Content], 
            base64 = Binary.ToText(binary, BinaryEncoding.Base64), 
            extension = Text.AfterDelimiter([Extension], ".", {0, RelativePosition.FromEnd}), 
            prefix = "data:image/" & extension & ";base64," 
        in 
            prefix & base64

 


Note: the column [Content] refers to the column where your image information is stored. It's default called [Content] but you may have adjusted the base column with something else. Adjust as necessary.

EDIT: For some reason the colon is getting replaced on my screen. Just in case, here's a screenshot:

hnguy71_0-1719876072455.png

 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Syndicated - Outbound

Thanks for that suggestion.  I tried your code and here's the error I received.Error.png

Syndicated - Outbound

Hi @Mousemo 

You should have these columns:

hnguy71_0-1719942747354.png


Can you confirm that you have these?



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Syndicated - Outbound

I did add the Extension and Content columns.  How exactly is the Content column formatted and what goes in it?  Is it a text column that's converted to Binary?Columns.png

Syndicated - Outbound

Hi @Mousemo 

The Content column houses all your information regarding your image. Binary is a data format which needs to be converted in order to be used within the Power BI model.

 

Can you open your advanced editor and copy and paste the code here? Or show me a screenshot of your first applied step.



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)