How to prevent a specific users’s profile photo (gravatar) from showing on the frontend to other users?

Use this hook function to replace user’s avatar (which is passed in as HTML <img ...> tag) if user’s ID or email matches your condition. You can use any other default image, or get individual replacement image for each user.

function my_get_avatar($avatar, $id_or_email, $size, $default, $alt) {
    if ($id_or_email == "[email protected]") {
        $img = "http://path.to/default/avatar.jpg";
        $avatar = "<img src="".$img ."" alt="".$alt."" height="".$size."" width="".$size."" />";
    }
    return $avatar;
}
add_filter('get_avatar', 'my_get_avatar', 10, 5);