Make WordPress Core

Opened 9 years ago

Last modified 5 years ago

#35085 new defect (bug)

Image editor not cropping correctly when image size is the same as "Large Size" in media settings

Reported by: verysimple's profile verysimple Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: Media Keywords: needs-patch
Focuses: javascript, administration Cc:

Description

This issue was reported as an issue for the plugin Imsanity here: https://wordpress.org/support/topic/imsanity-breaks-the-image-editor?replies=10

However, after research, it appears this behavior happens regardless of the plugin. A video demonstrating the error is at: https://www.youtube.com/watch?v=3a6UbuPrlmU&feature=youtu.be

To reproduce:

  1. Ensure media settings for "Large Size" are set to 1024px
  1. Upload a landscape image with a width of exactly 1024px to the media library
  1. Click the "Edit" button to edit the image, and use the crop tool to make an obvious change. The image will appear to have been cropped at this point
  1. Click the "Save" button and now the image will no longer appear to be cropped

The image now seems to be in an unknown state where the preview shows the un-cropped version, but in the editor the crop shows correctly.

Change History (4)

#1 @verysimple
9 years ago

After further testing, the image size doesn't even have to be exactly the same as the large media size limit. It just has to be close to that size. For example, repeating the test above using a landscape image with width of 1048 - the bug is still triggered.

#2 @verysimple
9 years ago

  • Summary changed from Image preview glitch when image size is the same as "Large Size" in media settings to Image editor not cropping correctly when image size is the same as "Large Size" in media settings

#3 @joemcgill
8 years ago

  • Focuses javascript administration added
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

Thanks for the detailed explanation @verysimple. This still seems to be an issue in 4.5 and only occurs when you're editing inside the wp.media modal, and not through post.php?post={id}&action=edit.

#4 @programmin
8 years ago

Still happening on 4.5.4, with a 1024x681 image.

Note: See TracTickets for help on using tickets.