How to display an image captured with media capture

Hello Everyone,

I am using Ionic 4 and Cordova Media Capture plugin to capture photos for Android .

(Media Capture - Awesome Cordova Plugins)

As soon as I use the basic Image capture method

this.mediaCapture.captureImage(options) .then(
(data: MediaFile) => {

I am receiving this data for media file :-
[{“name”:“1585411855340.jpg”,“localURL”:“cdvfile://localhost/sdcard/Pictures/1585411855340.jpg”,“type”:“image/jpeg”,“lastModified”:null,“lastModifiedDate”:1585411864000,“size”:889041,“start”:0,“end”:0,“fullPath”:“file:///storage/emulated/0/Pictures/1585411855340.jpg”}]

But don’t know how can I display this image in the device directly right after capture.
I have tried using the base64 plugin to convert it to base 64 format and tried displaying.
It doesn’t work. It gives me a Not “NOT_FOUND_ERR”.

I later tried to use webview and it’s method :-
const img = this.webview.convertFileSrc(filePath)
The path I get is :
http://localhost/_app_file_/storage/emulated/0/Pictures/1585411855340.jpg",

But this time I get this error :-
E/WebViewAssetServer: Unable to open asset URL: http://localhost/_app_file_/storage/emulated/0/Pictures/1585411855340.jpg

I have tried this solution to enable permissions also but not worked .

If anyone has achieved this . Please let me know.

Thanks in Advance.

Hi @ysrikanth2017 ,even i am stuck on same problem!! did you find any suitable solution?

Same problem here.

Do you have any update?

In Android => convert to base64 and display the image.
In IOS => use webview plugin and display the image.

in my case the problem is with the video files