Base64ToGallery issue on upgrade


I ran ionic doctor check for my code and it recommended upgrading to latest ionic. So I did this and then when I invoked build, it gave me the following error:

        Argument of type '{ prefix: string; }' is not assignable to parameter of type 'Base64ToGalleryOptions'. 
        Property 'mediaScanner' is missing in type '{ prefix: string; }'. 

 L484:        function onSuccess(imageData) {
 L485:  _thisss.base64ToGallery.base64ToGallery(imageData, { prefix: 'Incident'; }).then(
 L486:    (res) => {

Documentation on the Ionic platform for this native plugin shows the following usage:

this.base64ToGallery.base64ToGallery(base64Data, { prefix: ‘_img’ }).then(
res => console.log('Saved image to gallery ', res),
err => console.log('Error saving image to gallery ', err)

My full code snippet looks like this:

var _thisss=this;
      function onSuccess(imageData) {
_thisss.base64ToGallery.base64ToGallery(imageData, { prefix: 'Incident' }).then(
  (res) => {

Has anyone else had this issue?


Same here, did you manage to fix this issue?


Just add mediaScanner to your code:

var _thisss=this;
function onSuccess(imageData) {
_thisss.base64ToGallery.base64ToGallery(imageData, { prefix: ‘Incident’, mediaScanner:true }).then(
(res) => {