Here is my configuration:
Ionic:
ionic (Ionic CLI) : 4.1.2
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.0
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0
Cordova Plugins : not available
home.html
<ion-content padding>
<button ion-button (click)="takePhoto()">Camera</button>
<button ion-button (click)="getPhoto()">Gallery</button>
<p *ngIf="imagePath">Source: {{imagePath}} </p>
<p align="center"><img *ngIf="imagePath" [src]="imagePath"/></p>
</ion-content>
home.ts
getPhoto(){
this.imagePicker.getPictures({
quality: 90,
maximumImagesCount: 1,
outputType: 0
}).then((results) => {
for (var i = 0; i < results.length; i++) {
//this.imagePath = this.DomSanitizer.bypassSecurityTrustUrl(results[i]);
//this.imagePath = normalizeURL(results[i]);
//this.imagePath = (results[i]).substring(8);
this.imagePath = results[i];
}
}, (err) => {
console.log(err);
});
}
And the output is :
I really dont know what is wrong , I would appreciate any help