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

WordPress Trac noreply at wordpress.org
Mon Feb 6 16:31:47 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 reporter-feedback                 |
-------------------------------------------------+-------------------------

Comment (by antonvlasenko):

 Thanks for the review, @adamsilverstein.

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

 I'm afraid I fail to understand how this is overly complex.
 My solution parses "crop ID" from both "large" and "full" images.
 If these crop IDs don't match (meaning that the Large image is outdated),
 it replaces the Large image with the Full image.
 The advantage of such an approach is that it allows WordPress to still use
 the Large image (where applicable).

 Honestly, I'm not entirely happy with either of the proposed PRs, as both
 sweep the underlying issue under the carpet.
 I think the proper solution will be to delete the Large image if the Full
 image has lesser dimensions than the Large image.
 However, I've no idea if implementing it will break backward
 compatibility.
 I think I will be able to submit a new PR sometime this week or at least
 investigate if it's possible to fix it this way.
 What is your opinion on that?

 > The underlying issue is the large image isn't cropped in this scenario
 and the code currently uses the large image.

 Yes, [https://github.com/WordPress/wordpress-develop/pull/2489/files#diff-
 d195a95739b20a3f63471dc34048a0afbdbf1f676a0e716dcccead4c4bf4cc3aR366-R369
 I understand it].

 > Could you please review and verify this resolves the issue you reported.
 I've reviewed your PR. Thanks.

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


More information about the wp-trac mailing list