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 have this setting in function.php

add_image_size( 'thumbnail-gallery', 185, 185, true );

It will display a square picture.

Everything is fine before I regenerate new size using "Regenerate Thumbnails" plugin.

After the process finished, the <?php the_post_thumbnail( 'thumbnail-gallery' ); ?> will return the original "big" url instead the regenerate url.

it does not crop. original file url. not square.

share|improve this question
add comment

2 Answers

Look at the wp-content/uploads/ directory. Does your cropped image exists there? (e.g. myimage-185x185.jpg). If not, you could try to call add_image_size() on the init action hook.

functions.php

function wpse27579_addImageSizes() {
    add_image_size('thumbnail-gallery', 185, 185, true);
}
add_action('init', 'wpse27579_addImageSizes');
share|improve this answer
    
yes. the generated images are there in wp-content. but WordPress just scale the image using css. –  neotorama Sep 3 '11 at 1:54
add comment

This work beautifly for me:

add_theme_support( 'post-thumbnails' );

set_post_thumbnail_size( 200, 300 );

add_image_size( 'thumbnailGallerySmall', 145, 120 );

The Integration Code

<?php the_post_thumbnail('thumbnailGallerySmall');?>

Try it.. and good luck

share|improve this answer
add comment

Your Answer

 
discard

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.