the_post_thumbnail( array(x,y) );

I am trying to use the WP function the_post_thumbnail( array(x,y) ); but the images are are failing to resize properly. It’s just not working correctly.

Specifically in the page-template.php file I’m building I am trying to use:

Read More
the_post_thumbnail( array(200,200) );

Yet the resulting image is 200 x 150. What am I missing here?

I tried to explicitly add the thumbnail size to functions.php like so:

add_image_size( 'news-feature-thumb', 200, 200, true );

But it made no difference.

I looked all over StackOverflow, but I’ve seen nothing that answers my problem. I am using WP 3.3.1. Is this method deprecated?

Related posts

Leave a Reply

1 comment

  1. After you added add_image_size( 'news-feature-thumb', 200, 200, true ); try calling the_post_thumbnail like that:

    the_post_thumbnail( 'news-feature-thumb' );