Opened 2 years ago
Last modified 13 months ago
#59764 new defect (bug)
GD squashes image for cropped size
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Future Release | Priority: | normal |
| Severity: | normal | Version: | 6.3.3 |
| Component: | Media | Keywords: | reporter-feedback |
| Focuses: | Cc: |
Description
I have an image sub-size that uses crop instead of scale, and when the resulting image should upscale, GD does it OK-ish, Imagick is squashing the content.
In both cases, the resulting image has the expected width and height, but the content in the image generated with Imagick is not squashed. This happens for a portrait ratio of the original image.
How I replicate this:
- sub-size: 1440x760 px + crop
- original file: 1152x2048 px
- using the
image_resize_dimensionsfilter that returns the upscaled computation - upload file using GD
- upload the same file using Imagick
GD result - OK
https://imgur.com/EQTesQT
Imagick result - not OK
https://imgur.com/G0hjmo0
Change History (12)
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
2 years ago
#3
@
2 years ago
Hi @antpb!
Thanks for looking into this, it's been quite a while, and I had to redo my steps to replicate. The issue is still there in 6.5.2, but my initial comment is inaccurate, it's GD that produces the squashed image, Imagick does it well.
Please see my recording. For troubleshooting purposes, I implemented a small plugin that switches the editor class and also removes some image sizes, just to see generated the demo subsizes with the exact width and height.
I traced the issue down to the hook image_resize_dimensions, this seems to do different things in GD vs. Imagick.
This is what I used in my example:
crop_landscape crop of 1700x930
crop_portrait crop of 930x1700
Source image and recording https://imgur.com/a/Fnui2CV
Let me know if I can assist with the troubleshooting.
Have a nice day,
Iulia
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
23 months ago
#5
@
23 months ago
- Milestone changed from 6.6 to 6.7
- Summary changed from Imagick squashes image for cropped size to GD squashes image for cropped size
Moving to 6.7 to allow us some time to investigate. Onward!
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
20 months ago
#7
@
20 months ago
- Keywords reporter-feedback added
Hi @iulia-cazan ! We were reviewing this ticket again in the Media meeting and noticed that the site health report provided is using Imagick and not GD. Can you verify that this ticket title and description are still correct for this issue? Is it GD doing the squashing or Imagick? I know is been a while, but if you still have access to the environment this happens in please also provide the new site health report. Thanks so much!
This ticket was mentioned in Slack in #core by chaion07. View the logs.
18 months ago
#9
@
18 months ago
- Milestone changed from 6.7 to 6.8
Thanks @iulia-cazan for reporting this. We reviewed this Ticket during a recent bug-scrub session and based on the feedback received we feel the need to updating the milestone to 6.8 including the possibility of any contributor taking this forward possibly in time before 6.7 is released. However we would really appreciate if @iulia-cazan can follow up on the comments left by the core-media team and provide a much needed feedback.
Props to @khoipro
Cheers!
#10
@
17 months ago
Hi,
I wanted to follow up on this ticket. Since opening it, I’ve moved to a different machine and unfortunately haven’t been able to replicate the issue anymore. I’ve tested with the latest WordPress version as well as attempted to recreate the original environment (matching the PHP version and libraries), but the issue doesn’t occur. At this point, it’s unclear whether the problem was resolved in WordPress Core or was specific to the original setup. Please feel free to close this ticket if no further investigation is required.
Thank you for your time and support!
Best regards,
Iulia
Hi @iulia-cazan ! Is is possible for you to share the site health media information for the environment you are seeing the imagick resizing? Going to do some investigation into this and want to make sure we're aligned on versions. Thank you!
moving to 6.6 to investigate