Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
hxid3r
Regular Visitor

Export to Visual as PNG does not give the right exported Image

Hi,

I am trying to export a visual as a PNG using Power BI Rest API's. Now we are getting the blob as a response, but the image does not seem to be the right one. Its either always cropped, or is not how it should be. 

Please can anyone help?

Also sometimes, it just gives a grey empty image. Dont know whether its an issue from our end or is it the Power BI Rest API.

1 REPLY 1
MAwwad
Solution Sage
Solution Sage

There can be a few reasons why the exported image is not correct when using the Power BI Rest API to export a visual as a PNG.

  1. Incorrect parameters: Make sure that you are passing the correct parameters when making the API call. For example, check that the correct visual ID, width, and height are being passed in the request.

  2. CORS issue: The browser's same-origin policy may be preventing the API from accessing the image. You may need to configure your application to allow CORS (Cross-Origin Resource Sharing) for the domain that the API is being called from.

  3. Image quality: The quality of the image can be affected by the resolution and size of the visual. You may need to adjust these settings to ensure that the exported image is of the desired quality.

  4. Authentication: Make sure that you have the correct permissions and that you are authenticated properly to access the report, the dataset, and the workspace.

  5. Rate Limiting: Power BI API has rate limits, you should check if you have reached the limits of your subscription.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.