Make WordPress Core

Opened 11 years ago

Last modified 7 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 Owned by:
Priority: normal Milestone:
Component: Media Version: 4.4
Severity: normal Keywords: needs-patch
Cc: Focuses: javascript, administration

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
11 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
11 years ago

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

#3 @joemcgill
10 years ago

  • Focuses javascript administration added
  • Keywords needs-patch added
  • Milestone Awaiting ReviewFuture 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
10 years ago

Still happening on 4.5.4, with a 1024x681 image.

Note: See TracTickets for help on using tickets.