wordpress the_post_thumbnail() not cropping properly

I am using the wordpress function the_post_thumbnail(); but it seems to behave differently in different places. I have the following code on one page:

the_post_thumbnail(array('275', '190'));

Does exactly what it’s supposed to, i get a thumbnail exactly 275 x 190 that has been cropped to fit. I then paste this code to a different template and this time the image has been resized to the maximum dimension, either 275 wide if its landscape or 190 if its portrait.

Read More

Anyone know whats going on?

Related posts

Leave a Reply

1 comment

  1. Sure – the method of cropping/ resizing the thumbnail is normally determined in the templates functions.php file. Look for something along the lines of:

    <?php set_post_thumbnail_size( $width, $height, $crop ); ?> 
    

    The third parameter is the method of cropping, a boolean. Set it to true and it will crop the image exactly, set it to false and it will resize the image close to the dimensions you provide.