I have downloaded some images to my app. They get stored in the application directory. This is one of the urls:
file:///Users/w3/Library/Developer/CoreSimulator/Devices/CE0C21C3-2A3C-4C2F-AFF5-3A034A17F1EC/data/Containers/Data/Application/45AC6BC6-B8C2-433C-8E6C-3356EFAEB2B2/Library/NoCloud/WinGD%20Low-speed%20Engines%202017.jpg
If I paste this link into any browser the image shows fine. When placing it into an image tag inside my view, the image does not show. Changing the path to a wrong path shows the questionmark icon for not found. So the image should gets found by the device.
<img class="brochure" src='file:///Users/w3/Library/Developer/CoreSimulator/Devices/CE0C21C3-2A3C-4C2F-AFF5-3A034A17F1EC/data/Containers/Data/Application/304605E4-72D7-4C0F-9027-E46EC0C76C1E/Library/NoCloud/test.png'>
I have tried it with [src] and various additions to my config.xml
<allow-intent href="file:*" />
<access origin="file://*" />
and my index.html file.
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
No change. I´m testing on an ios11 emulator + on my physical device. Any help would be appreciated! Thank you!
UPDATE:
I'm getting the filepath like (with cordova-plugin-file):
this.file.resolveLocalFilesystemUrl(this.file.dataDirectory+"test.png").then(result => {
console.log("beforeresult:"+this.file.dataDirectory + "test.png")
console.log("result"+result.nativeURL)
return result.nativeURL;
}, error =>{
return JSON.stringify(error);
});