Ionic Capacitor camera how to reduce image size before uploading

Viewed 583

I have set the Capacitor camera plugin with the following options

const image = await Camera.getPhoto({
  quality: 20,
  width : 200,
  height : 200,
  allowEditing: false,
  source: CameraSource.Camera,
  resultType: CameraResultType.Base64
  });

After that I take the base64 and upload it to the server. However I am getting images in the 2-5MB range of size (Android). Is there any way of reducing/compressing the size further?

Already checked this and other similar postings but they seem to adjust the size by reducing the quality param and the width and height (which are already low in my case)

0 Answers
Related