title: Resize and compress image quality before upload in Firebase with Angular
body: <p>In my app an user can submit a photo that will be uploaded into <strong>Firebase Storage</strong>. I need to resize and compress the photo quality (without ruining it) to not take up much space in the storage and to speed up the upload an retrieve process.</p>
  
  <p>How can I do? advices?</p>
  
  <p>This is my <code>selectPhoto.ts</code> code that choose the photo that I will upload!</p>
  
  <pre><code>selectPhoto_phone(){
      this.camera.getPicture({
        sourceType: this.camera.PictureSourceType.PHOTOLIBRARY, 
        destinationType: this.camera.DestinationType.DATA_URL,
        quality: 100,
        encodingType: this.camera.EncodingType.PNG,
      }).then(imageData =&gt; {
  
        this.isEnabled = true;
        this.myPhoto = imageData;
      }, error =&gt; {
  
        this.isEnabled = false;
        console.log("ERROR -&gt; " + JSON.stringify(error));
      });
    }
  </code></pre>