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.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,122)