Support » Fixing WordPress » Post-Thumbnail Hard Crop Issue

  • Hey gang, I’m using the post-thumbnail function in a theme for a client and using the hard crop function to make the thumbs just perfect for the layout. The issue I’m having is that on my local testing server the hard crop function works perfectly but on the clients (Windows) server, no crop is taking place.

    In my functions.php file I’ve got this:

    if (function_exists('add_theme_support'))
    	set_post_thumbnail_size( 350, 200, true); // 350 pixels wide by 200 pixels tall, hard crop mode

    And then the call in my theme:

    <?php the_post_thumbnail(''); ?>

    Pretty basic stuff, just can’t figure out why it works on my local (Unix) but not on the Windows box.

    Any help would be greatly appreciated! Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Or maybe there’s a function/mode in php itself that needs to be turned on for cropping to occur? I’m stabbing in the dark here… help! or is this a GD or AJAX thing? How is WP doing the cropping?


    I’m having the same issue. No love :/

    I can’t imagine that this is that uncommon, maybe everyone else just gives up and crops their images before upload. I’ve hired a programmer to figure it out and will post the solution when we find one.

    I am also having this problem. The hard crop seems to have no effect?

    Well, I figured out the problem at least for myself.
    After modifying functions.php, I would remove the post thumb, from the post. However, silly me I wasn’t actually re-uploading the original images, I was just re grabbing them from the gallery.
    Glad I was only stuck on this for a day, sometimes simple things get overlooked.

    Not sure if you are still stuck on this one, but I may know what the problem is. Are you re-introducing the image to the media library? After setting new image sizes, WordPress will NOT go create the new size for all the images it already has. I think that is what jahsko is alluding to in his last comment.

    There is at least one plugin that will go back and re-size all the old images for you if you need. If you’d rather not deal with the plugin, just completely re-upload the image in question and (assuming there are no posts using the old image) trash the old one. The newly uploaded image should be properly sized.

    Resizing the old images seems to be the problem for some, but for the others (me included) it’s something else.

    The crop feature just doesn’t work properly.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Post-Thumbnail Hard Crop Issue’ is closed to new replies.