[wp-trac] [WordPress Trac] #33051: Pictures rotated 90 degrees left on upload

WordPress Trac noreply at wordpress.org
Wed Oct 7 21:53:57 UTC 2015


#33051: Pictures rotated 90 degrees left on upload
--------------------------+------------------------------
 Reporter:  rdlynch       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  4.2.2
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------------

Comment (by wpdavis):

 OK, first pass at a patch added, but something weird is going on. It seems
 the issue is when an image gets rotated but the orientation field in the
 EXIF data doesn't get changed. I'm not actually sure how to identify this,
 but if somebody has an idea I'm all ears.

 Here are examples of pretty much the same file. test1, if uploaded with
 the patch applied, will appear correctly. test2, if uploaded with the
 patch applied, will actually be over-rotated.

 http://trunk.wpdavis.com/test1.jpg => Exif:
 http://trunk.wpdavis.com/test1.php
 http://trunk.wpdavis.com/test2.jpg => Exif:
 http://trunk.wpdavis.com/test2.php

 Another concern: rotating the image on upload destroys the rest of the
 Exif data, so things like caption, copyright, camera info etc. aren't
 preserved (at least using the GD library), and they obviously need to be.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33051#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list