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

I'm curious what dependencies add_image_size() has because I just copied a theme over to a new server and began adding thumbnails to custom post types only to find out that my request for hard-cropping is being ignored, and the images are kept proportional.


set_post_thumbnail_size( 80, 80, true );
add_image_size( 'micro', 32, 32, true);
add_image_size( 'featured', 340, 225, true );
add_image_size( 'videowide', 460, 225, true );

On my local server (WAMP Server on Windows Vista) the true is respected, and the images are cropped in such a way that extra pixels are lost - edges aren't respected. On my live server (CloudLinux Server 5.5 x64), the images are kept proportional.

Is there some gdlibrary dependencies or something I am needing to change on the live server to get the expected results?

share|improve this question
What versions of everything (PHP, Apache, etc) are they each running? – EAMann Dec 2 '10 at 22:29
Both are running PHP 5.2.9 and Apache 2.2. – Sampson Dec 2 '10 at 22:38
Is Apache loading with all the same extensions (and same versions of extensions) in both environments? – EAMann Dec 2 '10 at 22:51
PHP Extensions are important here. Please list those for the two systems. – hakre Dec 2 '10 at 22:54
up vote 3 down vote accepted

This particular issue was caused by an environment missing GD. After installing GD on the server, the issue was resolved. Of course you will need to go back and re-submit your thumbnails to have correct cropping, or use a plugin to retroactively recreate your thumbnails.

share|improve this answer

Your question reminded me of a time when I was playing with the Wordpress 3.0 beta and ran into a similar issue. Not sure if this will help you or not, but I stumbled across this post in the Wordpress forums.

Hi guys.

I´ve spent a lot of my day looking for a solution for this issue and here is the solution, in front of my eyes! Thanks to stylishbeachbum and Alex Mansfield. Yeah, the issue depends of the server. I´m using apache/php/mysql on Windows XP and the php_hd2 extension wasn´t enabled.

I´ve enabled that and now is working.

Thank you guys.

I'd love to know if this is the case. I had a few experiments in my Wordpress lab using custom image sizes, but abandoned my tinkering when I mas met with similar oddities.

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.