How to create post thumbnail

I am working on the WordPress Twenty Ten theme, and I want to display post thumbnails. I have followed the steps below:

I do not want to crop the image. How can I do this? Please help where I am wrong in my process.

Thanks in advance.

Related posts

Leave a Reply

3 comments

  1. IF you want to retrieve thumbnail in size that you had set with set_post_thumbnail_size() then call the_post_thumbnail() without passing any arguments.

    That will default to named post-thumbnail size that that set_post_thumbnail_size() actually creates.

    Also crop for this will be determined by third argument in set_post_thumbnail_size() (defaults to false) and is not tied to media settings (those control entirely different sizes of image).

  2. Maybe it’s just a typo, use

    the_post_thumbnail(array(150,150));
    

    instead of

    the_post_thumbnail(array(150,150);
    

    Another thing is, I’ve never used this in the loop.php only in functions.php

  3. A couple things to try:

    1. Create a new custom image size: add_image_size( 'my-custom-thumb', 150, 150 ); Play around with the dimensions, to see how WordPress reacts. There may be a collision, since there is already a 150×150 image size.

    2. Regenerate your thumbnails, using the Regenerate Thumbnails Plugin or the Ajax Thumbnail Rebuild Plugin.

    3. And, as @Rarst said: remove the array from the call to the_post_thumbnail(); either pass it no parameters, or pass it an image-size-name as an argument.