WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to set a different thumbnail size for different pages? For example, I want the thumbnails on my category, archive and tag view to be bigger than on my home.php.

Right now I have the following code in my function.php:

add_theme_support( 'post-thumbnails' );

set_post_thumbnail_size( 250, 165, true );

Do I have to modify my function.php or is it also possible to modify the thumbnail size in the home.php where I want the size to be different from index.php?

share|improve this question
up vote 2 down vote accepted

In your functions file you need to add image sizes:


share|improve this answer
Awesome, thanks so much!! :) – japanworm Aug 26 '11 at 11:24
accept it as the right answer then? – Alex Older Aug 26 '11 at 12:56
Yes, thanks :) For now that was exactly what I was looking for :) – japanworm Sep 1 '11 at 6:04

Here is the one you need: http://codex.wordpress.org/Function_Reference/wp_get_attachment_image

And some examples of how to use it:

That way, It will return an 300 width and 200 height image. But yeah, @Alex makes a right point here. Use add_image_size is easier.

share|improve this answer

Your Answer


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.