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
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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