exif – plupload, preserve_headers = false, and autorotation issue

I have a jpeg image where the EXIF Orientation flag = 6, or “Rotate 90 CW”. Here’s the pertinent data from exiftool:

---- ExifTool ----
ExifTool Version Number         : 12.44
---- File ----
File Name                       : orig.jpg
Image Width                     : 4032
Image Height                    : 3024
---- EXIF ----
Orientation                     : Rotate 90 CW
Exif Image Width                : 4032
Exif Image Height               : 3024
---- Composite ----
Image Size                      : 4032x3024

Here’s how IrfanView presents the image, with auto-rotate turned off:

the image top is to the left, indicating a 90 CW rotation is needed

Using the plupload “Getting Started” script from here, with preserve_headers = false, I get an image without EXIF headers – as expected – but rotated 180 degrees, which is unexpected. Again, the view with IrfanView:

the top of the image is now to the right - a 180 degree rotation

Here’s the “resize” snippet from the code:

resize: {
            width: 5000,
            height: 5000,
            preserve_headers: false

Is there something I’m doing wrong? I would have expected a 90 CW rotation on upload with the EXIF stripped.


Edit: I’m using plupload V2.3.9

Read more here: Source link