A colleague of mine has recently asked to provide him a background image from a Power BI Desktop file I have had shared with him previously. Because sometimes the original images are lost and only preserved in .pbix files, I figured a quick blog post about extracting the images would be useful. Custom themes too can be extracted in the same way.
Nothing could be easier! If you have 7-Zip or similar software installed, you can right-click on your Power BI Desktop file and open it as archive:
Alternatively, you can change the extension of your .pbix file to .zip (ignore the warning about changing the extension) and then open the file.
Either way, you will then see something similar to the following:
All you need to do is open the Report folder, then the StaticResources folder, and finally the RegisteredResources folder. You will be presented with a list of images and the theme used in your file:
You can extract your images and theme simply by dragging and dropping them into any folder outside of the file. Don’t worry, the images stay in the file 🙂 No more lost images and themes!
Because Power BI can’t tell if you are uploading the same image into a file multiple times, doing so needlessly increases file size. If you need to use the same image in multiple places — for example, the same background on different pages or the same image in a visual — the best practice is to duplicate pages or visuals. So instead of choosing the same background image for each page individually, create a “template page” first, then duplicate it. Same applies to visuals — copy them instead of re-uploading an image every time. This way, Power BI stores an image only once.
In case you changed the extension of your file before opening it, just change it back before working on the file again.
Happy extraction!