In my project, I'm able to capture the image via camera or gallery the size of the Image file vary to 5-6 MB based on the quality of camera or user selected image.Then I have to upload it on server.
The requirement is, before upload the file on remote server, I want to apply lossless compression on image to reduce the file size to 1-2MB so it will save internet cost of user & and my server space as well.
We can't do it at the time of calling method from navigator with options {targetHeight: xxx, targetWidth: xxx} to capture image as the application may use in various devices which has various orientations too.
Thanks for any help.