cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Patron
Post Patron

Viewing Images in Power Apps When Image Stored in SP List

I have a Power App where a user can upload a single image which is stored in a SP list and I need to display a single image  referencing the data in the SP List.   I recently watched a tutorial where the author used multi-line text as the column type for storing images and I used his example and the SP List "Images" col stored the uploaded image in this format: appres://blobmanager/40b84da9ea044259a8a0d7ce5525da6e/11

How do I reference this when rendering an image in Power Apps?   

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @bolin-stratus :

The image control can recognize ‘network location of pictures(URL)’ or ‘pictures in binary format’ and display them. I think "appres://blobmanager/40b84da9ea044259a8a0d7ce5525da6e/11" is not any of them.

If you need to save local pictures in a multi-line text column in a SharePoint List and then dispaly them in canvas app, then I recommend converting the pictures to binary format.

I've made a test for your reference:

1\Add an add picture control(UploadedImage1)

2\Add a button and set it's OnSelelct property to

 

Set(
thevar,
Substitute(JSON(UploadedImage1.Image,JSONFormat.IncludeBinaryData),"""","")
)

I use it to display images that are converted to binary format. Similarly, if the binary text is saved in the multi-line text column of the SP list, the image control can also recognize and display it.

 

3\Add an image control and set it's Image proeprty to

 

thevar

 

The Result(I have added the test results as an attachment😞

2.gif

I think this link will help you a lot:

Save-image-in-SharePoint-List 

Best Regards,

Bof

View solution in original post

5 REPLIES 5
Community Support
Community Support

Hi @bolin-stratus :

The image control can recognize ‘network location of pictures(URL)’ or ‘pictures in binary format’ and display them. I think "appres://blobmanager/40b84da9ea044259a8a0d7ce5525da6e/11" is not any of them.

If you need to save local pictures in a multi-line text column in a SharePoint List and then dispaly them in canvas app, then I recommend converting the pictures to binary format.

I've made a test for your reference:

1\Add an add picture control(UploadedImage1)

2\Add a button and set it's OnSelelct property to

 

Set(
thevar,
Substitute(JSON(UploadedImage1.Image,JSONFormat.IncludeBinaryData),"""","")
)

I use it to display images that are converted to binary format. Similarly, if the binary text is saved in the multi-line text column of the SP list, the image control can also recognize and display it.

 

3\Add an image control and set it's Image proeprty to

 

thevar

 

The Result(I have added the test results as an attachment😞

2.gif

I think this link will help you a lot:

Save-image-in-SharePoint-List 

Best Regards,

Bof

View solution in original post

@v-bofeng-msft - Thank you for your response.  I just had to update my Patch() from Image: UploadedImage1.Image to Image: Substitute(JSON(UploadedImage1.Image,JSONFormat.IncludeBinaryData),"""","") and it worked! Thank you!

@v-bofeng-msft - I have an unexpected issue now.  After uploading 4 images to my SP list, the list keeps generating "This page isn't responding" message in my browser.  This was not happening before until I changed how I store the image data in the Images column. Any recommendations?
SP LIST - page not responding Nov 25.PNGSP LIST Columns Nov 25.PNG

Hi @bolin-stratus :

I have not encountered this situation. If this problem persists, I suggest you use another method to store images.

I think this link will help you a lot:

Storing Images from a gallery into columns in SharePoint Online  

Best Regards,

Bof

@v-bofeng-msft - It's interesting because I have tested storing base64 strings in a SP list multi-line text column several times now  and it seems that enabling versioning may cause this issue.  I have even subsequently disabled versioning on the list and the issue remains. Still testing but I really need the base64 solution to work. 

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (12,624)