ionic-image-loader icon indicating copy to clipboard operation
ionic-image-loader copied to clipboard

convertFileSrc method missing in some WebView

Open Enrico204 opened this issue 6 years ago • 0 comments

As mentioned here, convertFileSrc is missing in some WebView version (such as in Ionic 3 with WebView 1.2.1). The current workaround (until an upgrade is done) is to set this.imageLoaderConfig.setImageReturnType('base64'); so the image is serialized in Base64, but this is not very efficient.

I suggest to create a local version of convertFileSrc method (see here for implementation) to use if the original one is missing, or if the global WebView object is undefined (this is my case).

I can't create a PR right now (too busy), but I'll be happy to contribute if no one will work on that :-)

Enrico204 avatar Apr 16 '19 08:04 Enrico204