Saving and retrieving images from file directory


#1

Hi!
so I am fairly new to ionic 2 and I was wondering, how could I take a picture then store it on the phone and retrieve it afterwards in order to display again.
Right now I am using:

  Camera.getPicture(options).then((imageData) => {

      this.base64Image = 'data:image/jpeg;base64,' + imageData;
    }, (err) => {
      // Handle error
      console.log(err);

    });

What I would like to do is to save the image in the directory of the app and then retrieve it.
I would be using ionic storage to save the path to the image in order to display it later.


#2

(I changed your post to format your code or error message correctly. Please use the </> button above the post input field to format your code or error message or wrap it in ``` (“code fences”) manually. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.)

This exists: https://ionicframework.com/docs/native/file/