web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to add image from ...
Power Apps
Answered

How to add image from a gallery into html text field?

(0) ShareShare
ReportReport
Posted on by 78

Hi,

I have a gallery which imports images from a SharePoint list. 

1.JPG

I have created a HTML table in HTML text input control.

 

"<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
 border: 1px solid black;
 text-align: left;
}
</style>
</head>
<body>
<h2>CÓDIGO CHECKLSIT</h2>
<p>SHOP FLOOR (fecha firma)</p>
<p>ÁREA: "& lblArea_3.Text &"</p>
<p>SALA/LÍNEA/ ZONA: "& lblSala_3.Text &"</p>
<table style='width:100%'>
 <tr>
 <th>Tipo de Observación</th>
 <th>Descripción</th> 
 <th>Foto</th>
 <th>Departamento</th>
 <th>Comentarios Acción</th
 </tr>"
 &
 Concat(Gallery3_4.AllItems, "<tr><td>" & Tipodeobservación & "</td><td>" & Descripcion & "</td><td><img src=" & Label6.Text & "></td><td>" & AccionTemp.Nombre & "</td><td>" & AccionTemp.Accion & "</td></tr>")
 & 
"</table>
</body>
</html>
"

 

For the image I am using "Label6.Text" to get the image, but the image is not showing.

This is the table that I am getting.

2.JPG

 

Please help.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,996 Most Valuable Professional on at

    HI @Soumodip ,

    Please have a read of this thread.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Soumodip Profile Picture
    78 on at

    Hi @WarrenBelz ,

    The thread deals with static image in Base 64 or from a source. I need to fetch images from a gallery where the images are stored in SharePoint list in Base 64 format.

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    Hi @Soumodip ,

    Although I don't understand what are you trying to do, i noticed that your HTML code has a problem. You are missing the quote from src and that's why HTML compiler ignore the part with the image.

    The part with Label6.Text should look like this: <img src='" & Label6.Text & "'>

    Here is your code modified: 

     

    "<!DOCTYPE html>
    <html>
    <head>
    <style>
    table, th, td {
     border: 1px solid black;
     text-align: left;
    }
    </style>
    </head>
    <body>
    <h2>CÓDIGO CHECKLSIT</h2>
    <p>SHOP FLOOR (fecha firma)</p>
    <p>ÁREA: "& lblArea_3.Text &"</p>
    <p>SALA/LÍNEA/ ZONA: "& lblSala_3.Text &"</p>
    <table style='width:100%'>
     <tr>
     <th>Tipo de Observación</th>
     <th>Descripción</th> 
     <th>Foto</th>
     <th>Departamento</th>
     <th>Comentarios Acción</th
     </tr>"
     &
     Concat(Gallery3_4.AllItems, "<tr><td>" & Tipodeobservación & "</td><td>" & Descripcion & "</td><td><img src='" & Label6.Text & "'></td><td>" & AccionTemp.Nombre & "</td><td>" & AccionTemp.Accion & "</td></tr>")
     & 
    "</table>
    </body>
    </html>
    "

     

     

  • Soumodip Profile Picture
    78 on at

    Hi @gabibalaban ,

    Thanks for pointing it out, but even after adding the quotes the image is not appearing.

    To clarify my issue, I want to add images from PowerApps gallery to an HTML table.

  • Verified answer
    CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Soumodip ,

    Interesting, it seems that <img> inside HTML text control doesn't work with data: URL (didn't try that until now).

    I've made a test on RichTextEditor control based on your needs and everything works fine, of course you have to deal and hide somehow the RichTextEditor controls (maybe with a blank label).   

  • Soumodip Profile Picture
    78 on at

    Hi @gabibalaban ,

    Thanks a lot. Can you please share the code?

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Soumodip 

    Use your code inside the Default property of a RichTextEditor control.  I'm sure that you'll get the expected result.

  • Soumodip Profile Picture
    78 on at

    Thanks a lot @gabibalaban , worked like a charm ! 🙂

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

#2
11manish Profile Picture

11manish 193

#3
Valantis Profile Picture

Valantis 138

Last 30 days Overall leaderboard