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 made few thumbs size. But some of them make total resize of original pict or make new with specified sizes from right bottom corner. Is this posible to centrilize thumbs? I meen to make new thumb with specified size but with offset to center / centilize them?

add_theme_support( 'post-thumbnails' );

 if ( function_exists( 'add_image_size' ) ) { 
    add_image_size( 'last-posts-thumb', 0, 160);
    add_image_size( 'last-posts-thumb-4-3', 120, 160, true);    
}
share|improve this question

2 Answers 2

I tried and use successfully this code which allow to define image size using specific cropping position for this image size : bt_add_image_size( 'product-screenshot', 300, 300, array( 'left', 'top' ) );

It allow centering option so it looks like matching your purpose. I've added the code in a separate php file that I included into functions.php

share|improve this answer

Have you looked at the Tim Thumb script. It might help you with this. http://www.binarymoon.co.uk/2010/08/timthumb-part-4-moving-crop-location/

share|improve this answer

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.