in reply to substitutions with unknown data

You don't want the \b, you want to match whitespace or start/end of string.
$message =~ s|(?:^|\s)\Q$face\E(?:$|\s)| <img src="$location" alt="$na +me"> |gi;

Caution: Contents may have been coded under pressure.