Cordova app Image src inside src/static folder not loading in device f7 version 6.3.4

<meta http-equiv="Content-Security-Policy" content="default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: gap: content:;
   img-src * 'self' data: https: app:; script-src 'self' 'unsafe-inline' 'unsafe-eval' *;
   style-src  'self' 'unsafe-inline' *">

config:

<access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
    </platform>

Also vertified whitelist cordova plugin

Please note images are loading in browser and not in device after build

It is 404 error - means file not found → path you specified in your code is not correct

Yes 100% correct file is missing inside www folder. I fixed it.

I’m using the latest version of Framework7, my previous build, f7 automatically move the image source files from src/static/*.png to cordova/www/static/*.png

In my current version of f7 6.3.4 image files are not automatically moved to cordova www folder after build npm run build-cordova-ios, only font,css,js and other files are rendered and moved.

I manually moved the src/static folder to www/static and it WORKED.

1 Like

I have a similar problem , browser platform working fine but ios doesn’t display images and i can’t navigate between files when i do some thing like window.location.href , should i follow specific file structure like www/static anyone can help?