How to change image in base64 using ionic 4

i am woking

i am working on ionic 3 app. i want to convert image in base 64 i install base64 by npm and import it in my module.ts folder. when i am using in my component it is giving error while i select image. i dont know what is the issue. please help me how to resolve this.This one is my error

Uncaught (in promise): TypeError: Object(...) is not a function
TypeError: Object(...) is not a function
    at Base64.encodeFile (vendor.js:72661)
    at main.js:3380
    at t.invoke (polyfills.js:3)
    at Object.onInvoke (vendor.js:4982)
    at t.invoke (polyfills.js:3)
    at r.run (polyfills.js:3)
    at polyfills.js:3
    at t.invokeTask (polyfills.js:3)
    at Object.onInvokeTask (vendor.js:4973)
    at t.invokeTask (polyfills.js:3)
    at c (polyfills.js:3)
    at polyfills.js:3
    at t.invokeTask (polyfills.js:3)
    at Object.onInvokeTask (vendor.js:4973)
    at t.invokeTask (polyfills.js:3)
    at r.runTask (polyfills.js:3)
    at o (polyfills.js:3)

any help would be appreciated

I don’t really understand what type of image are you trying to convert? A Image that was taken via Camera?

it could be any but now for testing i am using iamge taken from gallery

istalled version of base64 is “@ionic-native/base64”: “^5.0.0”,

When you are using this Plugin: https://ionicframework.com/docs/native/camera , you can set the destination Uri to DATA_URL and the result will be base64. Otherwise you can convert Files to base64 by using the FileReader from JavaScript: https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL

what could we use in angular instead of javascript

Angular is based on JavaScript (TypeScript). So you can use the FileReader

ok sure thanks alot i ll try now and let you know

If you search the forums with your error message, you should find a metric ton of threads telling you how important it is for all @ionic-native/* things to share the same major version. Check your package.json to see if this is your problem.