scottdurow / power-drag-drop

MIT License
132 stars 29 forks source link

Unable to Display Base64 Image in Custom Page for Power Apps #76

Closed zestafonsky closed 4 months ago

zestafonsky commented 4 months ago

I am currently developing a custom page in Power Apps where I aim to display a base64-encoded image after each title in a row retrieved from Dataverse. For each row with an attached image, I extract the base64 string and use the following code snippet:

<div>
    <div>{{Name}}</div>
    <img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAXCAYAAADk3wSdAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABuSURBVEhLYyxRL/nPQGXABKWpCoaOoUhhqsLgszKOwV6fk+H7xYMMi8K3MNwhSxzFpYYMmkAFIMCprwnkwQCp4iiGnme4fvE7mPX94nUgDwZIFUfxPvXAaOzDwGjsUwmMxj4MjMY+lQANDGVgAACW05WKrYRY9AAAAABJRU5ErkJggg=='/>
</div>

While I expect to see the image appear after the title, only the title is displayed. The base64 string works correctly in other contexts (e.g., when inserting images directly), but it does not render as expected in this case. I have tried various troubleshooting steps but have not found a solution.

Could anyone provide guidance or suggest a fix for this issue?

zestafonsky commented 4 months ago
<div>
    <div>{{Name}}</div>
    <div style='background-image: url(data:image/png;base64,{{Image}});'></div>
</div>