You could also try /r/etymology.
Etymonline gives this:
mug (n.2) "a person's face," 1708, possibly from mug (n.1), on notion of drinking mugs shaped like grotesque faces. Sense of "portrait or photograph in police records (as in mug shot, 1950) had emerged by 1887. Hence, also, "a person" (especially "a criminal"), 1890.
Interestingly, similar processes happened in German and French with Kopf and tĂȘte.