Capacitor Image Quality from PhotoGallery

I am having an issue where the image quality option does not seem to matter when it comes to uploading an image. For example, I have a 4MB image that I want to upload at a quality: 10 however when I check the file size of it uploaded, it is still a 4MB file. I need to reduce this greatly because I use the image on pdf report that has other images and it is emailed at the end. The pdf size is sometimes coming over 25MB with several pictures on it

Here is my code on selecting and saving the file

  async selectStarImage() {
    const image = await Camera.getPhoto({
      quality: 10,
      allowEditing: true,
      resultType: CameraResultType.Uri,
      source: CameraSource.Camera
    if (image) {

  async saveStarImage(photo: Photo) {
    const base64Data = await this.readAsBase64(photo);

    const fileName = 'Star' + new Date().getTime() + '.jpeg';
    const savedFile = await Filesystem.writeFile({
      path: `${IMAGE_DIR}/${fileName}`,
      data: base64Data,
      directory: Directory.Data
    console.log('saved: ', savedFile);

No matter what I change the quality to, it never applies to the image. Anyone have any suggestions?