Change Default Thumbnail Size in WordPress
One question I get asked quite often is how to change the default size of the thumbnails that WordPress creates when you upload an image. It is actually quite easy to change - it just requires modification of one WordPress file. When WordPress 2.1 was released, it changed the way this was done, and once again with the release of WordPress 2.3, so I have included instructions below for versions 2.0 through 2.3. If you are using WordPress 2.5, there is now a built-in option to change the thumbnail size.
Instructions for:
WordPress 2.0
Open /wp-admin/inline-uploading.php and look for the following code:
if ( $imagedata['width'] > 128 && $imagedata['width'] >= $imagedata['height'] * 4 / 3 ) $thumb = wp_create_thumbnail($file, 128); elseif ( $imagedata['height'] > 96 ) $thumb = wp_create_thumbnail($file, 96);
The default max size is 128 x 96. You can change these numbers to whatever you like, although you must keep the proper aspect ratio (4 / 3).
For example, to double the size of the thumbnails, replace 128 with 256, and 96 with 192. Be sure to change both sets of numbers - they are each listed in the code twice.
WordPress 2.1 - 2.2
Open /wp-admin/admin-functions.php and look for the following code:
$max_side = apply_filters( 'wp_thumbnail_max_side_length', 128, $attachment_id, $file );
The number specified here (128 by default) is the maximum size of either dimension. Just change this to whatever you like.
WordPress 2.3
Open /wp-admin/includes/image.php and look for the following code:
$max_side = apply_filters( 'wp_thumbnail_max_side_length', 128, $attachment_id, $file );
The number specified here (128 by default) is the maximum size of either dimension. Just change this to whatever you like.
WordPress 2.5
WordPress 2.5 now includes a built-in option to change the size of thumbnails. In your dashboard, just go to ‘Settings -> Miscellaneous’


Jump to Comments