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?
Solved! Go to Solution.
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:
Best Regards,
Bof
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:
Best Regards,
Bof
@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?
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.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
214 | |
209 | |
84 | |
57 | |
36 |