Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm looking for a way to only set the width of a thumbnail size and let the height set auto. So if I have two images. One is 600px/420px and one is 600px/600px. I want to set only the width of the thumbnail to 200px so wordpress crops the thumbnails of the above dimensions to 200px/140px and 200px/200px. Any ideas?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

In your theme's functions.php file:

/* register new image size
 * 200px wide and unlimited height
add_image_size( 'wpse73058', 200, 9999, false );

In a template or the like:

if ( has_post_thumbnail() ) { the_post_thumbnail( 'wpse73058' ); }
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.