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

How do I set the medium and large images sizes in WP to hard crop?

In my theme I can set the thumbnail size to hard crop using this:

set_post_thumbnail_size( 96, 96, true );

But I can see no way to make the medium and large images to hard crop.

Is there possibly a way to remove the medium and large sizes and re-add them using:

add_image_size( 'medium', $width, $height, true );
add_image_size( 'large', $width, $height, true );
share|improve this question
up vote 15 down vote accepted

You can over write the default like this:

add_image_size( 'medium', 200, 200, true );
share|improve this answer
Yes it was this simple! I was so convinced it couldn't be that... – Brady Oct 13 '11 at 10:47

Here's an improvement that uses the settings as you tried to do:

add_image_size('medium', get_option( 'medium_size_w' ), get_option( 'medium_size_h' ), true );

share|improve this answer
the benefit from this solution is, that you still can set the measurements in the wp setting. sweet. – honk31 Apr 8 at 16:40

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.