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:
- Ensure media settings for "Large Size" are set to 1024px
- Upload a landscape image with a width of exactly 1024px to the media library
- 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
- 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)
#2
@
11 years ago
- Summary Image preview glitch when image size is the same as "Large Size" in media settings → Image editor not cropping correctly when image size is the same as "Large Size" in media settings
#3
@
10 years ago
- Focuses javascript administration added
- Keywords needs-patch added
- Milestone Awaiting Review → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.