# Unable to show the image using getPicture

**URL:** <https://forum.ionicframework.com/t/unable-to-show-the-image-using-getpicture/120526>\
**Category:** ionic-v3\
**Created:** [February 5, 2018, 1:50pm UTC](https://forum.ionicframework.com/t/unable-to-show-the-image-using-getpicture/120526 "2018-02-05T13:50:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kattasrinu](https://avatars.discourse-cdn.com/v4/letter/k/b5ac83/32.png) [@kattasrinu](https://forum.ionicframework.com/u/kattasrinu)\
**Post date:** [February 5, 2018, 1:50pm UTC](https://forum.ionicframework.com/t/unable-to-show-the-image-using-getpicture/120526/1 "2018-02-05T13:50:46Z")

</div>

var options = {

```
					destinationType: this.camera.DestinationType.FILE_URI,

```

encodingType: this.camera.EncodingType.JPEG,  
mediaType: this.camera.MediaType.PICTURE,  
quality:20,  
targetWidth: 544,  
targetHeight: 544,  
allowEdit: false,  
saveToPhotoAlbum: false  
};

```
alert("options"+options.destinationType);

		this.camera.getPicture(options).then((imageData) => {
			// imageData is either a base64 encoded string or a file URI
    // If it's base64:

    
    
    alert("image data "+imageData);
			this.image = 'data:image/jpeg;base64,' + imageData;
    alert("this.image << >> "+this.image);
     this.getCalories(this.image);
			}, (err) => {

```

console.log(err);  
});

---

<div class="post-metadata">

**Author:** ![kattasrinu](https://avatars.discourse-cdn.com/v4/letter/k/b5ac83/32.png) [@kattasrinu](https://forum.ionicframework.com/u/kattasrinu)\
**Post date:** [February 5, 2018, 1:52pm UTC](https://forum.ionicframework.com/t/unable-to-show-the-image-using-getpicture/120526/2 "2018-02-05T13:52:09Z")

</div>

Ionic info

ordova CLI: 7.1.0  
Ionic Framework Version: 2.0.1  
Ionic CLI Version: 2.2.1  
Ionic App Lib Version: 2.2.0  
Ionic App Scripts Version: 1.3.12  
ios-deploy version: Not installed  
ios-sim version: Not installed  
OS: Windows 10  
Node Version: v6.11.4  
Xcode version: Not installed

---

<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:51pm UTC](https://forum.ionicframework.com/t/unable-to-show-the-image-using-getpicture/120526/3 "2021-07-19T21:51:44Z")

</div>

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


