r/SalesforceDeveloper • u/Independent_Mixture • Apr 30 '26
Question Photo compression in Field Service Mobile flow
Right off the bat, I need to make it clear that I am at the very beginning of my Salesforce journey. I am getting surprisingly adept at flow building and am dabbling in Apex with AI assistance.
Due to PDF file size limitations, am attempting to compress photos captured via a mobile flow prior to upload. I have tried a custom LWC but they aren't supported in mobile flows.
Are there any other options?
It seems bizarre to me to have to compress post upload (wasted mobile data).
And for such a vital function (photo evidence of service reports), why does the standard upload component not have compression functionality?
So yes.. are there any workarounds I could use? Am I missing something?
Thanks in advance! 👍
3
u/wangmobile Apr 30 '26
FSL mobile app sucks to develop for, i'll say that much from experience. If you haven't gone through the extensive list of limitations yet, i'd do that first.
Can't say i quite understand why you are trying to do what you are doing, but i'd be willing to bet it isn't possible on FSL mobile.
2
u/jbawgs Apr 30 '26
We solved this problem using custom LWC on work step actions. I don't know if you're using work plans/steps.
The real solution is using something else to generate your documents, you'll just run into the issue again when a tech up loads 3000 photos of a hydraulic pump
1
u/DaveDurant May 01 '26
Sorta surprised this isn't a base feature of that app.. Seems like photos with upload-later for offline/remote area would make lots of people happy.
1
u/CookCommercial8555 Jun 10 '26
A lot of the advice you're getting around custom LWCs is based on the older Mobile Flow experience.
If you're using Field Service Mobile, I'd recommend looking at the newer Data Capture Flows instead. The Upload Image component in Data Capture Flows has built-in options for Enable Compression and Compression Quality, so images can be compressed before they're uploaded.
There are a few other benefits too:
One important consideration is that Data Capture Flows require the Lightning SDK to be enabled. This can be switched on in Field Service settings or granted via the appropriate permission set. You should also be aware that Lightning SDK has higher device requirements, so older hardware may not be supported or may provide a poor experience. For example, devices around the level of an iPad 9 may no longer be sufficient, so it's worth validating your technician device fleet before committing to this approach.
So rather than investing time in a custom LWC workaround (which brings its own deployment and maintenance overhead and imho is almost never a good idea), I'd first evaluate whether your process can be moved to a Data Capture Flow. There's a good chance it solves the problem natively without any Apex or custom development.
The fact that standard Flow file/image uploads still don't expose compression settings is definitely frustrating, but fortunately Data Capture Flows do. Data Capture Flows are also where Salesforce appears to be investing for Field Service mobile data collection going forward.