ionic-team / ionic-team/cordova-plugin-ionic-webview

Images are not displayed when converted using the window.Ionic.WebView.convertFileSrc(filePath)

Open
#643 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
493
Forks
410
PR merge metrics
No merged PRs in 30d

Description

I have created a cordova app with displaying of an image stored to the phone . Below is the code
I use cordova version 10.0.0 cordova-android version 9.1.0

Plugins used
cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview"
cordova-plugin-whitelist 1.3.4 "Whitelist"

the index.html is as follows

![image](https://user-images.githubusercontent.com/779253/117647150-3d8adf00-b1aa-11eb-8891-40a61523e3db.png)

index.js (file path exists)

![image](https://user-images.githubusercontent.com/779253/117647421-8fcc0000-b1aa-11eb-83e0-7e3227acc58b.png)

below is the output. The image exists and i have verified by manually navigating to the file path.

![image](https://user-images.githubusercontent.com/779253/117647643-da4d7c80-b1aa-11eb-81d8-f673df1c20ad.png)

source path for the img tag
![image](https://user-images.githubusercontent.com/779253/117647734-fbae6880-b1aa-11eb-8b5f-a842cca666a2.png)

What else am i missing to get this to working ?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.