[wp-trac] [WordPress Trac] #17626: image_get_intermediate_size() may return wrong thumbnail size

WordPress Trac noreply at wordpress.org
Thu Jun 13 09:18:58 UTC 2013


#17626: image_get_intermediate_size() may return wrong thumbnail size
-------------------------------------+-----------------------------
 Reporter:  chipbennett              |       Owner:  nacin
     Type:  defect (bug)             |      Status:  reopened
 Priority:  normal                   |   Milestone:  Future Release
Component:  Media                    |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+-----------------------------

Comment (by roytanck):

 I'm running into this bug, and it's driving me crazy.

 * Client uploads a 208*60px image for use in the Image Widget plugin
 * Thumbnail size is set to 120*120px
 * WP creates a 120*60px version of the image
 * image_get_intermediate_size returns the 120*60px one, even though $size
 is array(208,60)
 * Wrong image show in widget

 I'm forced to use WP 3.4.2 (which means the plugin uses legacy media lib
 code) for now, but can reproduce the problem with trunk by calling
 wp_get_attachment_image directly.

 @nacin Any suggestions? I think image_get_intermediate_size should either
 work with cropped images, or filter them out completely. In the first
 case, "area" is no longer a valid metric (a 400*100px and a 100*400px crop
 of the same 400*400px image have the same area).

--
Ticket URL: <http://core.trac.wordpress.org/ticket/17626#comment:18>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list