Make WordPress Core

Opened 7 weeks ago

Last modified 7 weeks ago

#63049 new enhancement

Image Editor: Changing crop aspect ratio can allow cropping area to exceed image boundary

Reported by: jordesign's profile jordesign Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Media Keywords:
Focuses: ui Cc:

Description

This experience can be recreated when editing an image in the core editor, and cropping it. When changing the aspect ratio of the crop - it appears to keep the fixed width of the cropping area and adjust the height based on the new ratio.

In some cases this will take the cropped area *outside* the border of the image and result in an error.

https://snipboard.io/GlBFq8.jpg

An enhancement would be to adjust height/width of the cropping area to ensure it is contained within the image.

Attachments (1)

Screenshot 2025-03-04 at 09.38.31.png (724.7 KB) - added by jordesign 7 weeks ago.
Screenshot of error

Download all attachments as: .zip

Change History (2)

@jordesign
7 weeks ago

Screenshot of error

#1 @joedolson
7 weeks ago

  • Version 6.7.2 deleted

It will probably take some exploration to determine exactly when this issue was introduced; the error message was added in [55919], but the crop behavior itself is older.

Note: See TracTickets for help on using tickets.