Sometimes I hate you, WordPress. Finding this took 3 hours of my life. In case you want avatars for comments with not "comment" comment type field ( for example, you introduce like, favorite, etc. types ) you need this to be extended:
$allowed_comment_types = apply_filters(
'get_avatar_comment_types', array( 'comment' )
);
as
add_filter('get_avatar_comment_types', 'add_new_comment_types');
function add_new_comment_types ( $types ) {
foreach ($this->methods as $method => $type ) {
if (!in_array( $type, $types ))
array_push( $types, $type );
}
return $types;
}
(Oh, by the way: this entry was written by Peter Molnar, and originally posted on petermolnar dot net.)