[wp-trac] [WordPress Trac] #50616: Image cropping API returns on wrong image.

WordPress Trac noreply at wordpress.org
Wed Jul 8 16:55:59 UTC 2020


#50616: Image cropping API returns on wrong image.
--------------------------+-----------------------------
 Reporter:  spacedmonkey  |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  trunk
 Severity:  major         |   Keywords:  needs-patch
  Focuses:  rest-api      |
--------------------------+-----------------------------
 If I edit 3 images with similar names, I get the wrong image returned.

 Example.
 Image one - unsplash-blah.jpg
 Image two - unsplash-wow.jpg
 Image three - unsplash-pow.jpg

 Returned
 Image one - unsplash-cropped.jpg
 Image two - unsplash-cropped.jpg
 Image three - unsplash-cropped.jpg

 For some reason it returned the first image. I believe the issue is
 related to `wp_unique_filename` not getting a unique filename.

 Tested in WordPress 5.5-beta1-48404

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50616>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list