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

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 II
Resolver II

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,419)