#1967·dropzone

Orientation fix vs Image Exif

Author: burukanCreated Apr 28, 2021Updated Jun 21, 2024

We have been working on photo upload and orientation vs auto-resizing.

We have been having problems with photo upload and I just wanted to check few things with you dropzone team.

Code seems to have "fixOrientation" that is always set as true (guess this was not supposed to be set via options?). That seems to read EXIF if possible (via library) and auto-rotate the image if needed.

Questions/Concerns

  • When an image is auto-rotated (and even more so, resized too), is this new rotation information also saved/updated with the new EXIF (if any beforehand?) ` if (resizeMimeType === 'image/jpeg' || resizeMimeType === 'image/jpg') { // Now add the original EXIF information resizedDataURL = ExifRestore.restore(file.dataURL, resizedDataURL); }

` I may be wrong but that code seemingly just restores the original EXIF info without taking the automatic file rotational changes into consideration?

  • While not totally related to above question I have noticed that an online search also seems to point that line to be culprit to many orientation problems on thumb display. I may open feature request to have callback support so that we can override the URL via returned data on server.

  • If this orientation/exif feature-set is not complete, are there any interim plans to have option to "ignore orientation work (exif or otherwise)" and do resize/upload without that meta?

I happen to be mainly a backend developer I have not had time to fully check this but will dig further soon.

Thanks!