[wp-trac] [WordPress Trac] #14459: Rotate Full Size Images on Upload

WordPress Trac noreply at wordpress.org
Sun Sep 8 03:20:26 UTC 2019


#14459: Rotate Full Size Images on Upload
-------------------------------------------------+-------------------------
 Reporter:  mrroundhill                          |       Owner:
                                                 |  mikeschroder
     Type:  enhancement                          |      Status:  reviewing
 Priority:  normal                               |   Milestone:  5.3
Component:  Media                                |     Version:  3.0
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing needs-unit-  |     Focuses:
  tests 2nd-opinion                              |
-------------------------------------------------+-------------------------
Changes (by azaozz):

 * keywords:  has-patch needs-testing needs-unit-tests => has-patch needs-
     testing needs-unit-tests 2nd-opinion


Comment:

 In 14459.4.diff:
 - Rotate the "full" size image when the uploaded image is above the
 threshold.
 - If not, and there is EXIF Orientation, make a copy of the original image
 and rotate it. Then use it as "full" size.
 - Rotate the image source before making sub-sizes.

 The patch handles all possible EXIF Orientation scenarios: flipped and/or
 rotated. May be a bit rough-around-the-edges at the moment but seems to
 work well here. May need some optimization especially in cases where the
 big image functionality is disabled (by returning `false` from the
 `big_image_size_threshold` filter).

 Pleas stress-test it!

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


More information about the wp-trac mailing list