angular-file-upload icon indicating copy to clipboard operation
angular-file-upload copied to clipboard

ngf-thumbnail is breaking image orientation

Open adamreisnz opened this issue 5 years ago • 2 comments

Using ngf-src, when taking a photo with portrait orientation on Android, it is displayed correctly in the portrait orientation. However, when using ngf-thumbnail, the orientation is broken and the image is display turned 90 degrees.

This is consistently reproducible.

Am I missing some settings to prevent this from happening? Using ngf-fix-orientation="true" doesn't help.

adamreisnz avatar Aug 19 '20 01:08 adamreisnz

The same is happening after an Upload.resize() on the client. The resized image is oriented incorrectly. This is despite using restoreExif: true.

Applying Upload.applyExifRotation() turns the image upside down... 😩

adamreisnz avatar Aug 19 '20 02:08 adamreisnz

I ended up not using any in-browser resizing/rotation/scaling, and ended up only using ngf-src instead of ngf-thumbnail, as I couldn't find a combination of tools/hacks/fixes to ensure a correct image orientation.

Images are now displayed correctly and uploaded correctly, and the server is taking care of resizing via kraken.io.

Still a pity, as I would have liked to minimise bandwidth sent to the server by resizing images on the client before upload.

If anyone has any tips on how to fix the problems mentioned in this issue that'd be great.

adamreisnz avatar Aug 19 '20 03:08 adamreisnz