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);    

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


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/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.