If you are using wkwebview(which is now default for new apps)
then follow below steps,
-
import { normalizeURL} from ‘ionic-angular’;
-
store your image path in some new variable.
var imagePath = this.file.dataDirectory + “test.png”;
this.tempImagePath = normalizeURL(imagePath); -
then in your html file,
use tempImagePath as image src.