[wp-trac] [WordPress Trac] #17626: image_get_intermediate_size() may return wrong thumbnail size
WordPress Trac
noreply at wordpress.org
Sat Jan 3 10:45:37 UTC 2015
#17626: image_get_intermediate_size() may return wrong thumbnail size
--------------------------+-----------------------------
Reporter: chipbennett | Owner: markoheijnen
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Future Release
Component: Media | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+-----------------------------
Comment (by Krstarica):
Hi Joe,
When one of the image dimensions is 0, WP resizes image proportionally
using non-zero dimension. This is the only way to generate correct
thumbnail without using crop.
E.g.
- if we specify array(300,0) as a new size, the image with dimensions
600x400 should be scaled to 300x200.
- if we specify array(0,100), the image with dimensions 450x300 should be
scaled to 150x100.
Sometimes this was working properly and sometimes it was picking the
incorrect dimension. Lately I've found some images not having the
specified dimension even with my 'patch', e.g. instead of array(300,0) it
picks array(640,0).
Warm regards,
Ivan
--
Ticket URL: <https://core.trac.wordpress.org/ticket/17626#comment:32>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list