# Save Base64 Image to gallery in iPhone/Android

**URL:** <https://forum.ionicframework.com/t/save-base64-image-to-gallery-in-iphone-android/150882>\
**Category:** Ionic Framework\
**Created:** [December 20, 2018, 6:21am UTC](https://forum.ionicframework.com/t/save-base64-image-to-gallery-in-iphone-android/150882 "2018-12-20T06:21:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![IonicDeveloper02](https://avatars.discourse-cdn.com/v4/letter/i/ecae2f/32.png) [@IonicDeveloper02](https://forum.ionicframework.com/u/IonicDeveloper02)\
**Post date:** [December 20, 2018, 6:21am UTC](https://forum.ionicframework.com/t/save-base64-image-to-gallery-in-iphone-android/150882/1 "2018-12-20T06:21:12Z")

</div>

I am trying to save generated qr Code to gallery of mobile, for that i am using Base64ToGallery plugin. Base64ToGallery Plugin is saving image in the following path " **/var/mobile/Containers/Data/Application/D453CNA6-ACC1-40F1-916A-D73B5A13975C/Library/NoCloud/\_img4622783188.png**" in iPhone. But i cant find the image under Photos of iPhone. Following is the code to save image into gallery

```
save() {
html2canvas(document.querySelector("#screens")).then(canvas => {
  try {
    this.qrCodeGen.base64Image = canvas.toDataURL('image/jpeg', 0.9);
      
        let options:Base64ToGalleryOptions = { prefix: '_img',mediaScanner: true };
        this.platform.ready().then(() => {

          this.base64ToGallery.base64ToGallery(this.qrCodeGen.base64Image,options)
          .then(
            res => {
              debugger
              console.log('Saved image to gallery ', res);
            },
            err => {
              debugger
              console.log('Error saving image to gallery ', err);
            });
        
        });

     } catch (error) {
          console.log("errorr ", error);
     }
    });

```

}  
If anyone did saving base64 string into gallery, it would be nice to get some solutions.

---

<div class="post-metadata">

**Author:** ![jakratiwanich](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jakratiwanich](https://forum.ionicframework.com/u/jakratiwanich)\
**Post date:** [January 16, 2019, 8:54pm UTC](https://forum.ionicframework.com/t/save-base64-image-to-gallery-in-iphone-android/150882/2 "2019-01-16T20:54:40Z")

</div>

I have the same problem. If anyone find a solution to this, please let us know.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:03pm UTC](https://forum.ionicframework.com/t/save-base64-image-to-gallery-in-iphone-android/150882/3 "2021-07-19T21:03:31Z")

</div>

Closed on July 19, 2021, 9:03pm UTC


