No local image showing in view on device

Hi again,

logcat of adb tells me something like „Not allowed to load local resource: file:///…“. Okay then I think it is for ionic project not possible to use external local resources :frowning: that IS really bad!

But I found a work around, where I think, this cannot be the solution: With $cordovaFile.readAsDataUrl(„file:///…“, „myPic.png“) I request the content oft he file. In the resolve-Method I put the result in the src-property of the img-tag and … it show the local resource.

Something like this:

  • In View

  • <img src=“{{ imgSrc }}“ />

  • In Controller

  • $cordovaFile.readAsDataUrl(„file:///…“, „myPic.png“).then(
    function(res) { $scope.imgSrc = res; },
    function(error) { alert(‚Arrrgh!‘); }
    );

This works … But this cannot be truth! It seems to me, that this is not a clean solution, but a workaround.

What I’ve to do to load local resources, like <img src=“file:///…/myPic.png“ /> ??? Can anyone answer this simple question? How to set permissions to allow chromium to use local resources on Android?

My config.xml has that tags …
<allow-navigation href=""/>
<allow-intent href="
"/>
<access origin="*"/>