[wp-trac] [WordPress Trac] #31296: Uploaded images are saved as a "resized" duplicate, if the size matches $_wp_additional_image_sizes

WordPress Trac noreply at wordpress.org
Fri Feb 27 19:37:49 UTC 2015


#31296: Uploaded images are saved as a "resized" duplicate, if the size matches
$_wp_additional_image_sizes
--------------------------+-----------------------------
 Reporter:  wpdennis      |       Owner:  wonderboymusic
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.2
Component:  Media         |     Version:  4.1
 Severity:  major         |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------
Changes (by wonderboymusic):

 * owner:   => wonderboymusic
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"31576"]:
 {{{
 #!CommitTicketReference repository="" revision="31576"
 In the `->multi_resize()` method of the `WP_Image_Editor` subclasses, when
 looping through potential crops, we need to make sure the crop isn't the
 exact same dimensions as the original image before copying it as a new
 crop.

 This ensures that we don't save multiple copies of the same image.

 Supposedly broke in [30639], but this logic was always missing. When I
 tested reverting [30639], there were still 2 files being created.

 Fixes #31296.
 }}}

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


More information about the wp-trac mailing list