The Problem with Default Image Links
If you simply copy and paste a link from OneDrive or SharePoint into your Power BI report, it might not work as expected. These links usually lead to a web page containing the image, not to the image file itself. As a result, Power BI cannot display the image.

Creating a Slicer with Images in Power BI
Let’s begin with a slicer that filters products by category. Initially, it looks very basic. The goal is to enhance it with images representing each category.

To achieve this, we can use a DAX measure with a SWITCH function that returns the appropriate image URL based on the product category.
Image Product Category =
SWITCH(
MAX( dimProduct[ProductCategoryName] ),
"Audio", "Image1",
"Computers", "Image2",
"Cell phones", "Image3"
)
Once the measure is created, go to the Measure Tools tab and set the Data Category to "Image URL". This ensures Power BI understands the measure as an image path.

Applying the Image Measure to Your VisualOnce the measure is created and the Data Category is set to "Image URL", it is time to assign this measure to the visual.
In the Format pane, go to the Images section of your slicer or visual and assign the measure to the Image field. This connects the logic from your SWITCH function to the actual image rendering in the report.

At this point, nothing significant appears to happen. The only visible change may be that the text shifts slightly. This is because Power BI is now reserving space for the image, even though it cannot render one yet due to missing or invalid URLs.
This is where things get more interesting: it's time to locate and test the actual image URLs from your OneDrive or SharePoint folder.

What Happens with Default OneDrive Links
When you right-click an image in your synced OneDrive or SharePoint folder and choose Share or View Online, you receive a link. Pasting this link into your report typically results in a blank space. The report will still recognize that a link exists, but no image is shown.

Then you can paste the first test URL directly into the DAX measure. This is the point where you connect the logic to a real image hosted on OneDrive or SharePoint.

The image does not appear in Power BI Desktop, nor after publishing it to Power BI Service.
The Right Way to Create a Shareable Image Link
Here is how to generate a link that works for everyone, including external users:
- Right-click the image and click "Share"
- Make sure the link is set so that "Anyone with the link" can access it
- Copy the link
- Remove everything after the question mark in the URL
- Add ?download=1 at the end
This version of the link points directly to the image file and allows Power BI to display it correctly.

Once added to your measure or column, the image should now appear in Power BI Desktop.

Testing Your Report in the Service and Public View
After setting up all the image URLs using the correct format, you can publish your report to Power BI Service and share it with others. Whether the report is viewed inside the organization or published to the web, the images will display correctly.
Personal vs Business OneDriveThe method works with both OneDrive for Business and Personal accounts. In both cases, use the same approach of modifying the link to end with ?download=1. Just make sure the sharing settings are configured to allow access.
Summary
Using images stored in OneDrive or SharePoint in Power BI is possible and reliable once you use the correct format of the link. Avoid copying default sharing URLs. Instead, create a public download link that points directly to the image file.
This ensures your visuals display consistently across all environments and for all users.
Hope you like it!
Give it a try and see how it works for you! I’d love to hear what you think or see how you use this trick in your own reports.