function add_custom_gravatar ($avatar) {
$custom_avatar = get_bloginfo('template_directory') . '/images/name-of-your-custom-gravatar.jpg';
$avatar[$custom_avatar] = "Gravatar name to be shown in the WordPress settings"; //change this name to your preferences
return $avatar;
}
add_filter( 'avatar_defaults', 'add_custom_gravatar' );