[wp-trac] [WordPress Trac] #34384: No way of preventing image_get_intermediate_size from returning cropped image
WordPress Trac
noreply at wordpress.org
Sat Jul 16 20:44:45 UTC 2016
#34384: No way of preventing image_get_intermediate_size from returning cropped
image
--------------------------------------------------+------------------------
Reporter: pputzer | Owner: joemcgill
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 4.6
Component: Media | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests 2nd-opinion | Focuses:
--------------------------------------------------+------------------------
Comment (by joemcgill):
[attachment:34384.9.diff] cleans up some style/typo issues in
[attachment:34384.2.diff]. In the process, I noticed that I had a typo in
the thumbnail fallback check which had the effect of always bypassing the
fallback. However, it turns out that the only time the fallback
‘thumbnail’ gets returned is when the size array requested is smaller than
the dimensions of the thumbnail size, otherwise, we return `false` when no
images matching the requested ratio are found.
This makes me wonder if we should remove the fallback altogether and let
people who are relying on this functionality (which I suspect is a very
small number of people) fix it themselves using available filters.
However, [attachment 34384.9.diff] keeps the current fallback behavior and
adds an additional unit test to make sure we are retaining the fallback
behavior.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34384#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list