cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lmheimendinger
Resolver III
Resolver III

Power Apps HTML <img> from SharePoint field

In my app, I have captured both a photo and pen input, saved them in SharePoint Picture Libraries (in the same site as my source lists for the app).  Each SharePoint column is defined as a hyperlink column and has the correct values stored in them; I can click on the column contents and see the .jpg images appear as a new browser tab.

 

I am trying to create HTML content to use in an email, and used the following:

 

<img src=" & gallery.selected.photo & " >

 

but in the email it shows as a red x in a small square.

 

I added a line of html as

 

"& gallery.selected.photo. &" and what shows up is

 

https://<tenent>.sharepoint.com/sites/<sitename>/<filename>.jpg

 

That is exactly what I expected.

I am suspecting that the src=wants " before and after this string but I haven't been successful at generating that.

 

<img src="" " & gallery.selected.photo  & " ""> 

<img src=" & "gallery.selected.photo " & " >

either create an error in the HTML field or still don't resolve into an image.

 

Help, Please!  Not a HTML wizard and I find the syntax for HTML in Power Apps a bit weird as well.

 

 

 

 

 

 

3 REPLIES 3
v-bofeng-msft
Community Support
Community Support

Hi @lmheimendinger :

This is an Outlook setting problem, I have three solutions:

Solution 1:

please turn off this option:

1.PNG

Solution 2:

Use web Outlook. I made a test :I can see the picture normally with Web Outlook, but I cannot see the picture with desktop Outlook.

Solution 3:

Use thumbnail.I assume that your pictures are stored in the library. Then you can get its thumbnail.

For example:

picc is my library and my pic is solved in picc

1\Add a Gallery

items

 

picc

 

2\Send the email

 

Office365Outlook.SendEmail(
 User().Email,
 "BofTest",
 "<img src=" & Gallery10.Selected.Thumbnail.Large& " >",
 {IsHtml:true}
)

 

Best Regards,

Bof

 

lmheimendinger
Resolver III
Resolver III

none of these worked sorry to say.

 

The images are stored as .jpg files in a picture library in SharePoint and both the entire library and the individual images have been given view by everyone assignments.  Might the issue be that instead these should be in OneDrive for Business?

Hi @lmheimendinger :

On my side, the three solutions I provided all worked well.I suggest you consider providing detailed information about your app. (What is the data structure of the library?/What is the familiar item of Gallery? What is ".photo"?)

You could also consider creating a support ticket.

Best Regards,

Bof

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,828)