Vue-image-upload-resize not autoRotating pictures

530 Views Asked by At

In my DjangoREST/ Vue.js app I use Vue-image-upload-resize to upload pictures to my backend. But before I upload them, I check with Google Vision API if the pictures belongs to the right category.

I used Chromium 78 to write/ test my app and everything works 100%. But I have tried my application with newer Chrome version (86) and I have a major issue. Images are not autoRotated and as a consequence, Google Vision API don't get the same 'labels' from the pictures and my uploading filter would not work.

Here is my Vue-image-upload-resize configuration, note that autoRotate is set to true

<image-uploader
     :preview=false
     :className="['fileinput', { 'fileinput--loaded': hasImage }]"
     capture="environment"
     :debug="1"
     :quality="1"
     doNotResize="gif"
     :autoRotate=true
     outputFormat="verbose"
     @input="setImage"
     >   
 </image-uploader> 

In the documentation it's written

This functionality is based on the library [exif-js] https://github.com/exif-js/exif-js.

Any known issues with this library?

I've tried on the oficial codesandbox (https://codesandbox.io/s/mqnow97omj?module=%2Fsrc%2Fcomponents%2FHelloWorld.vue) and I have the same issue. So it's no related to my code. Can anyone tries to upload a picture taken upward to check if they have the same bug as i do?

1

There are 1 best solutions below

0
Toto Briac On

I found the answer and I am sure it will be useful for someone else. Chrome in his later version does autorotate automatically. So if you set autoReverse=true, it will reverse and allready reversed picture.