Thanks for your suggestions. I have done all the changes and deploy the app on my device. Now when I open the app I don’t receive any broken image but also I don’t see any image at all. The image seems to be there but does not appear.
I also get the following error when I debug from the chrome://inspect/#devices:
Yes, just try to add the file transfer plugin and see if it works then:
ionic plugin add cordova-plugin-file-transfer
If that doesn’t help then we may need to reconsider using angular-image-cache because to be honest it isn’t adding real value in your use case (because your images are already local so caching is redundant).
What we would really need to figure out is how to prevent “unsafe” from getting added before the “file:” protocol in your src attribute. If you want you could send me your source code and I could have a look at it, maybe it’s something simple …
I have installed the FileTransfer plugin and rebuild the app and when deployed it the images were broken again. Now the < img > tag includes the following information:
Okay I had a look and I have it working on my Android device. To get it working I made only the following 2 changes in www/index.html:
I noticed that the “ion-content” tag wasn’t closed properly, the end tag was coded “” instead of “” ( the “t” was missing).
I went back from angular-image-cache to normal ng-src (without the cache, which is redundant anyway because the files are local).
Both lines were already there with the “ng-src” line commented out. So all I did was uncomment the line that was commented out, and comment out the line that was not commented out, resulting in:
Yes I noticed immediately that the closing tag was incorrect, my editor/IDE flagged it “red”.
And yes, the “Content-Security-Policy” tag (the meta tag) is important, and highly recommended.
So it means that you can remove angular-image-cache from the app again, since it’s not used anymore.