title: Ionic storing multiple photos
body: <p>Hi I have a problem with storing multiple photos. So basically it select photo from the phone gallery and it works fine till there. But when I want to select another photo it replaces the previous one.</p>
  
  <pre><code>getImages() {
      this.photos = [];
      const options: CameraOptions = {
        quality: 100,
        destinationType: this.camera.DestinationType.DATA_URL,
        encodingType: this.camera.EncodingType.JPEG,
        mediaType: this.camera.MediaType.PICTURE,
        sourceType: this.camera.PictureSourceType.SAVEDPHOTOALBUM
      };
  
      this.camera.getPicture(options).then(
        imageData =&gt; {
          const base64Image = "data:image/jpeg;base64," + imageData;
          const imageName = `image_${this.subject.id}` + ".";
          const component = { imageName, base64Image, type: "image" };
          this.photos.push(component);
          this.photos.reverse();
          this.saveState();
        },
        err =&gt; {
          console.log(err);
        }
      );
    }
  
  &lt;ion-row *ngFor="let photo of photos; index as i" nowrap&gt;
      &lt;ion-icon class="subject-body-icon" name="camera" (click)="previewImage(photo)"&gt;&lt;/ion-icon&gt;
      &lt;span (click)="previewImage(photo)"&gt;{{ photo.imageName }}&lt;/span&gt;
    &lt;/ion-row&gt;
  &lt;/div&gt;
  
    &lt;button class="disable-hover transparent-button" ion-button icon-only (click)="getImages()"&gt;
      &lt;ion-icon name="cloud-upload"&gt;&lt;/ion-icon&gt;
    &lt;/button&gt;
  </code></pre>