web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Compressing images add...
Power Apps
Unanswered

Compressing images added via "AddMediaButton" to Sharepoint

(0) ShareShare
ReportReport
Posted on by 115

Dear community,

 

I built an app that allows the users to edit the sharepoint databses of my other apps. One option they have for one specific database is to add pictures to it. Following some internet posts, I save the pictures in Sharepoint using "Long text" as Data Type and using the formula Substitute(JSON(Item.Img_helperPicture.Image, JSONFormat.IncludeBinaryData),"""", "")

 

Yesterday, when testing the app, I was very successful in the beginning (after adding 17 pics), but when I added one specific I noticed that the everything became REALLY slow, specially the Sharepoint. Sharepoint after this point barely managable.

I checked the Picture values for the two pictures I added and (after a lot of fight with MS Word and MS Sharepoint) I managed to copy it into Word and count the number of characters: around 8 million.

For comparison, the other 17 pics I added previously had around 110.000 characters and they work like a plume.

 

Then I checked the picture files and of course the difference lies on it: the first 17 files have around 200 kB of size, the problematic one is normal photo taken with a camera that has around 5 MB.

 

My question. How can I overcome this? If my users, for any reason, add any picture that causes the same behaviour I saw for the first one, the app and the database will not be usable anymore, far from it.

 

Does anybody have any idea? Thanks in advance.

 

Categories:
  • LeoGS Profile Picture
    115 on at

    One more quick info: one of the apps that I built also saves photos to Sharepoint, but these photos are made directly in the app using the camera. I checked one example and the base64 String has around 54 thousand characters, also pretty much okay.
    My problem described in the post above concerns pictures that are stored in the hard drives of the users, pictures that are made with a camera and have some Megabytes in size. How can I manage it?

  • LeoGS Profile Picture
    115 on at

    Hi community,

    Any idea here?

    Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard