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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

I want to render an image through html visuals

I am trying to render an image through html visuals

 

  1. there is a table OLSR with attribute Style Code having some code like abc123 based on the product
  2. when i drill through style code i see some details on the next page, besides those details i want to see the image of the product which should be rendered dynamically using html visuals
  3. to do so, i created a measure named html , having the following code

    html visuals = "

     

    <!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: ""Attributes[Style Code]""
    }]
    });
    myGallery.render();
    </script>
    <div id=""my-gallery"" style=""max-width:80%;margin:auto"">
    </div>
    </div>
    </div>
    </div>
    </head>
    <body>

    </body>
    </html>


    "

  4. This code either gives me no image or the entire code as output. how do i pass this style code dynamically into the html so that it gives me image
3 REPLIES 3
lbendlin
Super User
Super User

Where in your HTML are you specifying the image that should be rendered? 

 

You may want to try with a simple image viewer visual first.

Anonymous
Not applicable

<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: ""Attributes[Style Code]""
}]
});
myGallery.render();
this is a javascript code in script tag. 

Attributes[Style Code] is a column with alphanumeric value like abc111 which should be passed into tag and get image from cloud

Most likely Power BI sees that as a cross site script vulnerability.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.