Forum Discussion

molegris's avatar
molegris
Icon for Advocate IV rankAdvocate IV
2 years ago
Solved

How to replace image in the NATIVE image visual ?

Hi,

I have reports with many images using the native image visual and I need to update the images. Considering that those visuals are heavily customize (titles, sous-titles, properties, formats, etc.); I was wondering if there's an easy way to update the image without having to delete everything and insert new images?

 

I've been searching and I've read a lot of things...

  • using the icon attribut in button visuals,
  • installing Cloud Share visual,
  • installing Image Grid visual,
  • hosting your image on Azure then adding urls to your dataset and then use a card visual to display that image_url,
  • I almost forgot, someone also suggested to save my reports has projects, uncompressed them, then used VSCode to programmatically update the source image of my image visuals, seriously!? 

 

I found hard to beleive that Microsoft didn't think about that "feature" for the native image visual they provide in their product.  I'm thinking maybe it's a user error and I'm just missing it. If that's the case then mea-culpa!

 

That's why I'm asking to community : Is there an easy way to replace source image in an image visual, other than the unwieldy suggestions above?

 

Thank you

--mo

  • molegris's avatar
    molegris
    2 years ago

    Hi Anonymous ,

    Thank you for your answer but I've tried working with zipped pbix files before and it's VERY unstable.  I think that's actually why MS came up with the new save as project feature (the .pbip format).

     

    The save as project (.pbip) is what I actually used to accomplished the work I needed to do in the usecase I described in my original post. To be honest, it wasn't that hard because I'm a computer engineer and I'm familiar with ALM and CI/CD concepts. I just often found myself frustrated when I see things that should have been designed for average non-IT employees and were not!

     

    In anyway, in case someone has a similar problem and reads this post, here's how I did it :

     

    1. Open your report (.pbix) in Power BI Desktop.  Go to Save as, then select the option Save as project (*.pibp).  Close Power BI Desktop.
    2. At the location you saved the .pbip file, you'll also find a gitignore file and two folders ; one for semantic and one for report.


    3. In the report folder, navigate to \myReport.Report\StaticResources\RegisteredResources.  You'll find your images there.  You can replace the image files here but keep the same names.
    4. Then go back to where the .pbip file is saved and double click.  It will open the project and take into account the changes you made in RegisteredResources.
    5. You can then go to File>Save as>PBIX... Done!  you now have a report (pbix) with your need images.  N.B. Some fine tuning might be required, especially if your new images are not exactly of the size as the old ones

     

    --mo

     

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi molegris 

     

    Perhaps you could change the .pbix file to a .zip file and replace the file, I think that would be easier.

     

    Hope it helps!

     

    Best regards,
    Community Support Team_ Scott Chang

     

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

    • molegris's avatar
      molegris
      Icon for Advocate IV rankAdvocate IV

      Hi Anonymous ,

      Thank you for your answer but I've tried working with zipped pbix files before and it's VERY unstable.  I think that's actually why MS came up with the new save as project feature (the .pbip format).

       

      The save as project (.pbip) is what I actually used to accomplished the work I needed to do in the usecase I described in my original post. To be honest, it wasn't that hard because I'm a computer engineer and I'm familiar with ALM and CI/CD concepts. I just often found myself frustrated when I see things that should have been designed for average non-IT employees and were not!

       

      In anyway, in case someone has a similar problem and reads this post, here's how I did it :

       

      1. Open your report (.pbix) in Power BI Desktop.  Go to Save as, then select the option Save as project (*.pibp).  Close Power BI Desktop.
      2. At the location you saved the .pbip file, you'll also find a gitignore file and two folders ; one for semantic and one for report.


      3. In the report folder, navigate to \myReport.Report\StaticResources\RegisteredResources.  You'll find your images there.  You can replace the image files here but keep the same names.
      4. Then go back to where the .pbip file is saved and double click.  It will open the project and take into account the changes you made in RegisteredResources.
      5. You can then go to File>Save as>PBIX... Done!  you now have a report (pbix) with your need images.  N.B. Some fine tuning might be required, especially if your new images are not exactly of the size as the old ones

       

      --mo

       

      • Carpathians's avatar
        Carpathians
        New Member

        Thanks for the solution offered! I've one concern though. If  your report was already published, would this change to "project" create a different link to the report once re-published? I don't want to replace my report,  just change one image...

         

        Thank you!