Hi
I am using the below function to crop the featured images when they are displayed on the archive pages
add_filter( ‘generate_blog_image_attributes’,’tu_variable_image_sizes’ );
function tu_variable_image_sizes( $atts ) {
// Set up our conditional
if ( is_post_type_archive( ‘figures’ ) || is_tax( ‘figurecategory’) ) {
$atts[ ‘width’ ] = 300;
$atts[ ‘height’ ] = 300;
$atts[ ‘crop’ ] = true;
}
// Return our options
return $atts;
}
Which works and crops nicely. But it’s cropping in a position of center center. I would like to crop from the top down.
I know you can register new image sizes with the below code, but can you do something similar in the above function?
//* Register Image Sizes
add_image_size( ‘figurethumb’, 300, 300, array( ‘center’, ‘top’ ) );
Thanks,
Matt