[wp-trac] [WordPress Trac] #11913: post thumbnail isn't using resized images
WordPress Trac
wp-trac at lists.automattic.com
Fri Jan 15 17:57:20 UTC 2010
#11913: post thumbnail isn't using resized images
-------------------------------+--------------------------------------------
Reporter: Denis-de-Bernardy | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.9.2
Component: Post Thumbnails | Version: 2.9.1
Severity: normal | Keywords:
-------------------------------+--------------------------------------------
Comment(by Denis-de-Bernardy):
adding this code in a theme fixes the issue, in case anyone needs a
temporary fix:
{{{
add_filter('image_downsize', 'my_thumbnail_downsize', 10, 3);
$thumbnail = get_the_post_thumbnail();
remove_filter('image_downsize', 'my_thumbnail_downsize', 10, 3);
...
function my_thumbnail_downsize($in, $id, $size) {
if ( $in || $size != 'post-thumbnail' )
return $in;
return image_downsize($id, 'thumbnail');
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11913#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list