In my app an user can submit a photo that will be uploaded into Firebase Storage. 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.
How can I do? advices?
This is my selectPhoto.ts
code that choose the photo that I will upload!
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 => {
this.isEnabled = true;
this.myPhoto = imageData;
}, error => {
this.isEnabled = false;
console.log("ERROR -> " + JSON.stringify(error));
});
}