Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

When I add a featured image to any post the image is not cropped but it is always displayed full size.

The media settings are ok...

even when I call <?php the_post_thumbnail(); ?> in my theme, the full image is shown instead of the thumbnail.

What I am doing wrong? It is probably my 30th Wordpress based site and I never had this problem before.

Thanks

share|improve this question
1  
This works only for images that were uploaded after the thumbnail was registered. Is that the case? –  toscho May 8 '12 at 12:29
    
yes, this is the case. I guess there is a plugin interfering. –  Mirko Jun 11 '12 at 18:32

3 Answers 3

Do you mean that when you crop an image in the Wordpress image editor and save it, the featured image is still the uncropped one? That's a bug in Wordpress, please see http://core.trac.wordpress.org/ticket/19889. The editor does not create thumbnails for custom sizes (including 'post-thumbnail'), only the ones defined in options ('thumbnail', 'medium' and 'large').

share|improve this answer

By default, the_post_thumbnail() $size parameter is 'post-thumbnail'. You can set that by adding this line to your functions.php :

set_post_thumbnail_size(125,125,true);

If this still doesn't update your image's size, you may need to use a plugin like "Regenerate Thumbnails."

Alternately, you can set the image to use one of the Media Options-defined sized by passing a $size parameter to your thumbnail template tag like this:

the_post_thumbnail( 'thumbnail' ); // display post thumbnail with the "Thumbnail" size defined in Settings > Media.
share|improve this answer

Do you have add_theme_support( 'post-thumbnails' ); in functions.php?

See http://codex.wordpress.org/Function_Reference/the_post_thumbnail

share|improve this answer
    
Yes, I am using the Twenty Ten theme as base theme –  Mirko Mar 23 '12 at 10:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.