Most animals cannot recognize themselves in a mirror.
The exceptions include bonobos, orangutans, chimps, dolphins, elephants, and humans… some of the greatest hits of evolution.
Psychologists have pondered the implications on consciousness of a neural basis of self-awareness.
But I have not seen a discussion as to why and how this capability has evolved. Do you know of a discussion of this topic? It’s not mentioned on wikipedia.
I am thinking of static image self-recognition ( a dynamic moving image could be an avatar and I would call that imitation-recognition, like monkey see, monkey do).
Except for a narcissistic glance into a still pond, most animals have not evolved in the presence of mirrors or smooth reflective surfaces. And it’s particularly tricky for the underwater dolphins (no reflection to see).
Why might self-recognition be important to the propagation of certain species? It seems to me that the key is not the recognition of self, but the recognition of offspring. Facial recognition of ones children in a social grouping seems like a differential advantage for long-term child rearing and protection.
Other perceptual paths have been pursued, and suffice in certain contexts. Scent requires proximity, and seems to be easily masked in some cases (e.g., handling chicks leading to rejection by the mother bird). Penguins identify their young in the herd by the sound of their chirp (has the accuracy of that been tested?)
Perhaps the mirror self-recognition phenomenon could be more accurately called facial progeny perception, with the recognition of self just an incidental byproduct.