Forum Discussion
Best Method for Storing Images in a SharePoint List Column
I have a Power App that will be used to upload a short text message and an image. There will ultimately be several thousands of these images uploaded over the next 12-24 months so I need a reliable method of storing the images in a SP List and a reliable method of displaying the images within the Power App. My SharePoint list column type for storing images is text multi-line. I saving the images via Patch(). I am using an Add Media Button which produces an image attachment that has the name "UploadedImage1".
I have tried two methods for storing the images in a SP list where the column type is text multi-line.
// Has intermittent issues displaying images stored in the SP List
Patch( ShoutoutsData, Defaults( ShoutoutsData ), {
Title: Value(Text(Now(), "[$-en-US]yyyymmddhhmmss")),
Image: UploadedImage1.Image
} )
// Works but Image column is sometimes storing large image files and it does not require very many image uploads before the SP list starts having issues displaying in a browser (you get the "The browser is not responding do you wanna wait" message
Patch( ShoutoutsData, Defaults( ShoutoutsData ), {
Title: Value(Text(Now(), "[$-en-US]yyyymmddhhmmss")),
Image: Substitute(JSON(UploadedImage1.Image,JSONFormat.IncludeBinaryData),"""",""),
} )
As noted in the comments above each Patch() formula, there are issues with each method and therefore I need an alternate approach to this. Any recommendations?