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

WordPress Trac noreply at wordpress.org
Tue Apr 5 00:51:11 UTC 2022


#55070: Image Editing Cropping is not working properly
---------------------------------------+---------------------
 Reporter:  andy786                    |       Owner:  (none)
     Type:  defect (bug)               |      Status:  new
 Priority:  normal                     |   Milestone:  6.0
Component:  Media                      |     Version:  5.9
 Severity:  critical                   |  Resolution:
 Keywords:  has-patch has-screenshots  |     Focuses:
---------------------------------------+---------------------
Changes (by ironprogrammer):

 * keywords:  has-patch => has-patch has-screenshots


Comment:

 == Test Report

 [https://github.com/WordPress/wordpress-develop/pull/2489 PR 2489] LGTM!
 👍🏻

 === Env
 * WordPress 6.0-alpha-52448-src
 * Safari 15.4
 * Chrome 100.0.4896.60
 * macOS 12.3.1 (Monterey)
 * Gutenberg DISABLED 🔴

 === Steps to Test
 1. Under ''Settings > Media Settings'', check the currently configured
 "Large size" image dimensions (default is 1024x1024).
 1. Upload a very large image to ''Media > Media Library'' (anything over
 the configured "Large size" above should work).
 1. After upload, with the selected image, click the **Edit Image** button
 under the preview.
 1. Click the **Crop** button and either adjust the crop using the handles
 overlay on the image, or by entering new dimensions in the ''IMAGE CROP >
 Selection'' sidebar. Set the crop to smaller than the site's configured
 "Large size", and click **Crop** again to apply the change. Observe that
 the image displayed refreshes to the cropped version. ✅
 1. Click the **Save** button. Observe that the image refreshes and shows
 the original un-cropped version. ❌
 1. 🛠 **Apply the patch, then refresh the ''Media Library'' page.**
 1. Restore the original un-cropped image by clicking **Edit Image**, then
 expanding the ''RESTORE ORIGINAL IMAGE'' sidebar and clicking **Restore
 image**. (Alternatively, upload a new very large image to work with.)
 1. ℹ️ Close the image viewer and re-select the image to re-open it (this
 is necessary because the crop tool does not reset to the original
 dimensions after being restored.)
 1. Click the **Crop** button and either adjust the crop using the handles
 overlay on the image, or by entering new dimensions in the ''IMAGE CROP >
 Selection'' sidebar. Set the crop to smaller than the site's configured
 "Large size", and click **Crop** again to apply the change. Observe that
 the image displayed refreshes to the cropped version. ✅
 1. Click the **Save** button. Observe that the image refreshes and shows
 the cropped version. ✅

 === Expected Results (✅)
 - After cropping a large image to be smaller than the site's configured
 "Large size", the image preview displays the cropped image. ✅

 === Additional Notes
 The above tests were performed with the "Large size" configured to both
 1024x1024 and 1200x1200.

 === Screenshots
 [[Image(https://cldup.com/mm_K00ocOX.png, 50%)]]
 ''Crop applied to large image (Step 9).''

 [[Image(https://cldup.com/WGl2Ybq6O8.png, 75%)]]
 ''Cropped image displayed in preview (Step 10).''

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


More information about the wp-trac mailing list