Skip to content Skip to sidebar Skip to footer

How To Display An Image From Ionic Native Image Picker?

I'm using Ionic native image picker: https://ionicframework.com/docs/native/image-picker/ I'm importing on my module import { ImagePicker } from '@ionic-native/image-picker'; And

Solution 1:

Instead of this.imgSrc = imageSource; I did

this.imgSrc = imageSource.replace('file://', '');

Works on both iOS and Android.


If you run into problems like Android crashing try this:

First I cleaned my project

# rm -rf
rimraf .sourcemaps node_modules platforms plugins www

Then installed packages

npm i

Then deploy the app again

ionic cordova run android --device

Solution 2:

You have to add "" in your src

<imgsrc="{{ imgSrc }}"alt="" />

Post a Comment for "How To Display An Image From Ionic Native Image Picker?"