To accomplish what you want and make sure it works even if you upload a really large image (which would switch over to a backstretch output), you need to go through a few steps:
- create a custom image size
- force the large (not backstretch) image output on singular posts/pages–this can be modified to cover other post types, too
- change the large image size to actually use your custom image size
- modify the RSS feed image
Here’s code examples to get you started, although you may need to tweak it depending on what you want your final output to be. Please practice safe coding, back up your files, etc. etc.
/**
* Create a new custom image size.
*/
add_image_size( 'author-image', 500, 500, false );
add_filter( 'display_featured_image_genesis_use_large_image', 'prefix_use_large_image' );
/**
* On singular posts, force the large image (not backstretch).
* @param $post_types
*
* @return array
*/
function prefix_use_large_image( $post_types ) {
$post_types[] = is_singular( array( 'post', 'page' ) );
return $post_types;
}
add_filter( 'display_featured_image_large_image_size', 'prefix_my_custom_image_size' );
/**
* Change the image size used for large image output.
* @param $image_size
*
* @return string
*/
function prefix_my_custom_image_size( $image_size ) {
return 'author-image';
}
add_filter( 'display_featured_image_genesis_modify_rss_image', 'prefix_author_image_feed', 10, 4 );
/**
* Modify the image in the RSS feed
* @param $image
* @param $align
* @param $style
* @param $class
*
* @return string
*/
function prefix_author_image_feed( $image, $align, $style, $class ) {
return get_the_post_thumbnail(
get_the_ID(),
'author-image',
array(
'align' => $align,
'style' => $style,
'class' => $class,
)
);
}
Hope this helps get you started.