Change Default Gravatar

If you want to change the default Gravatar image, use the snippet below:

add_filter( 'avatar_defaults', 'wpkb_change_gravatar' );

function wpkb_change_gravatar ($avatar_defaults) {
    $new_gravatar = get_bloginfo('template_directory') . '/images/new_gravatar.gif';
    $avatar_defaults[$new_gravatar] = "Gravatar";
    return $avatar_defaults;
}