oracle / cordova-plugin-wkwebview-file-xhr

Cordova Plugin for WebView File XHR
Universal Permissive License v1.0
138 stars 120 forks source link

Images are still not showing in from app img folder #61

Closed Karanveer-flymedia closed 3 years ago

Karanveer-flymedia commented 4 years ago

Hii dear, can you please help me i am stucked just because of this issue... images are still not showing in app after installing this plugin, i am using ionic1 and not able to upload my app on appstore please help me...

AlexanderTitian commented 4 years ago

I'm not the plugin developer, just a fellow app-dev trying to help. Can you provide an example of the file path you are using?

I have all my images setup via CSS with this file structure.

File structure:

_www
|---_ CSS
|---_ Images
     |---_ appicons
          |---_ navbar

CSS:

.cameraPNG{
    background:url(../images/appicons/navbar/camera-icon.png) no-repeat 50% 3px;
    display:block;
    height:100%;
    -moz-box-shadow:0px 0px 6px rgba(8,8,8,1);
    -webkit-box-shadow:0px 0px 6px rgba(8,8,8,1);
    box-shadow:0px 0px 6px rgba(8,8,8,1);
}
#markerA, #markerA2 {background-image:url(../images/mapBox-A-marker.png)}

After that, you might want to check your Content-Security-Policy located in your index.html. Mines a bad example as I'm still in development (Read some online sources carefully), but this is the meta tag you want to look for.

<meta http-equiv="Content-Security-Policy" content="
        default-src * data: blob: ws: wss: gap://ready file://* http://* https://*;
        form-action * data: http://* https://*;
        script-src * 'unsafe-eval' 'unsafe-inline';
        style-src * 'unsafe-inline';
        media-src *;
        img-src * data:;
        connect-src * ws: wss: mapbox:;
">
manish2788 commented 3 years ago

@Karanveer-flymedia Can you share detail of your setup and how you are configuring the file path.

Karanveer-flymedia commented 3 years ago

@manish2788 - it's done from my side this was because of my mistake... thanks for reply...