Article
How to optimize the quality of images / photos in a mobile application
18:39 Jun 01, 2018
Question
We are trying to optimize the synchronization time of the mobile application (offline), and one of the steps is image optimization.
How can we set the target image size (for example 1280 x 800)?
For example, there is a feature in Appache Cordova for this exact scenario.
Is it possible to do this in the settings or is it necessary to change the code?
Answer
We already optimaze images in the app.
Below is the code used in the base version:
Terrasoft.Camera.captureFromCamera({ quality: 70,//в процентах size: 1280,//по максимальной стороне success: function() {}, failure: function() {}, scope: this });
This code enables you to change the image size:
Terrasoft.sdk.RecordPage.configureColumn("Opportunity", "opportunityFilesDetail", "Data", { quality: 50 });