1

I am facing a problem using Dropzone with an image: Dropzone is sending a file to my server that is different from the original file.

I am using the library from the CDN https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.7.0/dropzone.min.js.

The file I send is https://picciao.com/img/photo-1.jpg The file I receive on my server is https://picciao.com/img/products/k1fDK7MRp40c3TVwPOu4FZOO.jpg

As you can see, the image hasn't the same orientation.

I do not understand where Dropzone is modifying my file.

As the problem seems related to image orientation / EXIF data, I tried to include the exif.js library but that did not solve the issue.

Do you have an idea please?

Arnaud
  • 4,884
  • 17
  • 54
  • 85

2 Answers2

2

Make sure you're not using the resizeWidth or resizeHeight options. I'm using 5.7.1 and there seems to be a bug with it not correctly resizing portrait images. The orientation get messed up.

https://www.dropzonejs.com/#config-resizeWidth

Paul Phillips
  • 1,480
  • 1
  • 15
  • 23
  • Thanks! I made it work by commenting the line `resizedDataURL = ExifRestore.restore(file.dataURL, resizedDataURL);` on the library (not sure why). – Arnaud Jul 16 '20 at 13:14
0

Either use resizeWidth or resizeHeight NOT both options and image will resize with proper aspect ratio.

ar31an
  • 241
  • 5
  • 9