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 designed and developed a site for my client. For images, I used the default WordPress sizes: original, large, medium and thumbnail (although I made some minute changes in their dimensions).

As I heard about the resizing images (i.e. large, medium etc.), it enhances the site speed, and I need them eagerly. Just now, I've learned about the LazyLoad, I hope I'll implement it later inshALLAH, but for now...
in homepage I used the thumbnail size: the_post_thumbnail( 'thumbnail' );.

But unfortunately the cropped thumbnail image from the original is looking bad. And also I don't want to load the original sized image, because that will hamper the site speed badly.

How can I manage it then?


I, actually want my thumbnail images to be cropped with the complete detail of the original image, but it actually cropping very precise part of the original.

How can I enable my WP to crop the original image to a thumbnail with its complete detail?


It's actually nothing but a default WP things:

        <?php if ( has_post_thumbnail( ) )  { ?>
            <a href="<?php the_permalink(); ?>" title="<?php printf( __('Permalink to %s', 'your-theme'), the_title_attribute('echo=0') ); ?>" rel="bookmark">
            <?php the_post_thumbnail( 'thumbnail' ); ?></a>
        <?php } else { ?>
            <a href="<?php the_permalink(); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/no-image.jpg" width="168" height="168" alt="Sultan Stationery - no image provided"/></a>
        <?php } ?>
share|improve this question
Please post all relevant code. –  Chip Bennett Oct 15 '13 at 12:40
try to change add_image_size('thumbnail'); with add_image_size('thumbnail', 168, 168, false); –  Rahil Wazir Oct 15 '13 at 12:41
@RahilWazir add_image_size() will make a new image file (.jpg) in the /uploads/ folder and will cause server load. I actually want to come out it. Am I thinking wrong about it? ...Is your code actually posing the default thumbnail size to a non-cropped thumbnail? –  Mayeenul Islam Oct 15 '13 at 12:47
If you want to change the values for default registered thumbnail update_option('thumbnail_size_w', 168); update_option('thumbnail_size_h', 168); update_option('thumbnail_crop', 0); –  Rahil Wazir Oct 15 '13 at 12:54
I'm sorry, but I'm really not following what exactly you're trying to do here. If the issue is targeted cropping: that's not currently possible in core for intermediate image sizes generated by core. The page speed thing seems to be an unrelated question. –  Chip Bennett Oct 15 '13 at 14:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.