Daily Tip: How to Change the Post Thumbnail Size in a WordPress Theme
August 2, 2010
If you enable post thumbnails for your theme, you will find that you may not like the default size. If you want all of your post thumbnail images to be the same size throughout your theme, then you can set it in functions.php:
set_post_thumbnail_size( 100, 100 ); // 100 pixels wide by 100 pixels tall, box resize mode
OR:
set_post_thumbnail_size( 100, 100, true ); // 100 pixels wide by 100 pixels tall, hard crop mode
However, if you want to have different image sizes for archives, custom category pages, posts, and custom post types, you can set them directly within the template tag, like so:
<?php the_post_thumbnail('thumbnail'); ?>
You can select from the following options:
the_post_thumbnail(); // without parameter -> Thumbnail the_post_thumbnail('thumbnail'); // Thumbnail the_post_thumbnail('medium'); // Medium resolution the_post_thumbnail('large'); // Large resolution the_post_thumbnail( array(100,100) ); // Other resolutions
For more information on post thumbnails, check out the WordPress codex or Mark Jaquith’s in-depth tutorial on how to use them.



Comments
Got something to say?