Can cloudinary images work within power bi

Options
snehal
snehal Member Posts: 1
edited May 2023 in Developer APIs

I am adding the below code as a measure to d3.js cutom visual in power bi.

however it is not giving me any image neither the script has errors.

Can cloudinary images be displayed as visual in power bi. if yes, HOW?


<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <div id="htmlContent">

        <div class="htmlViewerEntry">

        <div>

        <script src=https://product-gallery.cloudinary.com/all.js type="text/javascript">

        </script>

        <script type="text/javascript">

                 const myGallery = cloudinary.galleryWidget({

                   container: "#my-gallery",

                   cloudName: "cavenders",

                   mediaAssets: [{

                     tag: "00032"

                   }]

                 });

                 myGallery.render();

        </script>

        <div id="my-gallery" style="max-width:80%;margin:auto">

        </div>

        </div>

        </div>

        </div>

</head>

<body>

   

</body>

</html>

Answers

  • Tom
    Tom Member, Cloudinary Staff Posts: 65
    Options

    Hi @snehal ,

    Thanks for reaching out.

    I'm not familiar with Power BI and we do not have Power BI integrations it but it looks like you are using our Product gallery widget based on the HTML code.

    When I run your code via https://jsfiddle.net/tommygrg/un9rsg5k/1/ , it's rendering for me.

    So it looks like Power BI does not support it so I would recommend reaching out to them. One thing you can try is using client-side lists per https://cloudinary.com/documentation/advanced_url_delivery_options#client_side_asset_lists which is what the PGW (Product Gallery widget) uses. The link will return a JSON response with assets name and you can use that response to create a URL and render it.

    Please let me know if you have any other questions or queries.

    Kind Regards,

    Thomas