Replace Gravatar with img URL for avatars

Unless I have misunderstood your question to accomplish a custom gravatar to use in your theme add the code below to your functions.php or into a custom plugin.

From there customize the title and the image you want to use. See screenshot below for the finished outcome.

add_filter( 'avatar_defaults', 'dev_designs_gravatar' );
/**
 * Display a custom Gravatar
 * 
 * @param       $avatar
 * @return      mixed
 * @author      Joe Dooley - [email protected]
 *              
 */
function dev_designs_gravatar( $avatar ) {
    $custom_avatar            = get_stylesheet_directory_uri() . '/images/avatar_default.png';
    $avatar[ $custom_avatar ] = "Custom Gravatar";

    return $avatar;
}

See Custom Avatar in top right of the admin bar.
Select new Custom Gravatar option to set default gravatar for theme.