[wp-trac] [WordPress Trac] #55403: `wp_crop_image` returning incorrect file path when image formats filtered

WordPress Trac noreply at wordpress.org
Wed Mar 16 22:05:45 UTC 2022


#55403: `wp_crop_image` returning incorrect file path when image formats filtered
--------------------------------------+------------------------------
 Reporter:  Mat Lipe                  |       Owner:  adamsilverstein
     Type:  defect (bug)              |      Status:  assigned
 Priority:  normal                    |   Milestone:  6.0
Component:  General                   |     Version:  5.8
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------
Changes (by adamsilverstein):

 * owner:  (none) => adamsilverstein
 * status:  new => assigned
 * milestone:  Awaiting Review => 6.0


Comment:

 Hi @mat-lipe - thanks for opening this ticket. Indeed, I see the issue you
 identified, the the output path is changed on the fly during the save, so
 we should rely on the path returned from the save call instead of the
 original destination path.

 Fix in patch looks good to me, thanks for adding the test as well. I'd
 still like to test this via the steps you provided before committing;
 marking for 6.0.

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


More information about the wp-trac mailing list