How to offset thumbnails to the center?

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

Related posts

2 comments

  1. 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

Comments are closed.