WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.