[wp-trac] [WordPress Trac] #55070: Image Editing Cropping is not working properly

WordPress Trac noreply at wordpress.org
Fri Feb 3 20:06:05 UTC 2023


#55070: Image Editing Cropping is not working properly
-------------------------------------------------+-------------------------
 Reporter:  andy786                              |       Owner:
                                                 |  adamsilverstein
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.2
Component:  Media                                |     Version:  5.9
 Severity:  critical                             |  Resolution:
 Keywords:  has-patch has-screenshots has-       |     Focuses:
  testing-info                                   |
-------------------------------------------------+-------------------------

Comment (by adamsilverstein):

 Hey @antonvlasenko - thanks for your patience here.

 I reviewed your PR again and while it does fix the display issue, it feels
 overly complex.

 The underlying issue is the large image isn't cropped in this scenario and
 the code currently uses the large image.  I came up with an alternate
 approach in [attachment:"55070.diff"] (also at
 https://github.com/WordPress/wordpress-develop/pull/3985)  - switch to
 using the `full` sized image for the edit modal preview (instead of
 `large`).

 In my testing this resolves the issue you raised and the full size always
 gets the crop. I also tested rotating and after saving the preview was
 consistently correct. This does cause a potentially larger image to load,
 however this is still capped at the large image threshold and is probably
 fine in the edit context regardless - the image will actually show with
 higher fidelity on high dpi screens if we use the full size.

 Could you please review and verify this resolves the issue you reported.
 Also welcome any feedback on the approach of using the full size image
 here instead of large.

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


More information about the wp-trac mailing list