Camera-plugin metadata

I’m trying to get metadata (DateTimeOriginal) of a image the user selects. After that I’d like to resize the image an upload it to a server. When I use FILE_URI, the file gets resized and compressed and I can display it on my page but it loses the meta/exif information. So as a workaround I tried to use NATIVE_URI so I can read the metadata and resize it myself but I’m having trouble display the image on my page. Could anyone help me on how to display an image returned by the camera-plugin as NATIVE_URI. The better option for me would if the camera-plugin with FILE_URI would also keep the metadata but it looks like it doesn’t.

The image on my html-page looks like this:
<img style="height:100%; width:auto; " [src]="srcPhotoAuto">

and in my .ts file I try to set it like this:
this.srcPhotoAuto = file_uri;

My camera options:
let cameraOptions = { sourceType: Camera.PictureSourceType.PHOTOLIBRARY, //destinationType: Camera.DestinationType.FILE_URI, destinationType: Camera.DestinationType.NATIVE_URI, //quality: 70, //targetWidth: 1500, //targetHeight: 1500, //encodingType: Camera.EncodingType.JPEG, correctOrientation: true }

I use ionic 2 and typescript.

It’s greatly appreciated if anyone can help me.


I faced the same issue. Other destination type beside NATIVE_URI changes the metadata.
How to display the image with the NATIVE_URL returned?