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

Notifications

Announcements

Community site session details

Community site session details

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

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
    153,049 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,270 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,270 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,270 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard