A mirror is like a window into the mind of whoever looks at it. Whether we preen, recoil or body-slam the glass, our reactions to our own reflections can shed light on how we see the world in general.

That's especially true for non-human animals, since their response to a mirror can reveal their capacity for self-recognition. Scientists have been using this "mirror test" since 1969, finding that animals such as chimpanzees, elephants and dolphins can recognize themselves in a mirror. Even the wisest animals are often wary at first — including human infants, who rarely pass the test before they're 18 months old — but they eventually start poking at their own faces and providing other indications they get it.

While the mirror test is typically conducted on captive animals, a French photographer has made a name for himself by testing how wild animals respond to a mirror when humans aren't around. Since 2012, Xavier Hubert Brierre and his wife have released a series of videos from Gabon, where they set up a large mirror and a hidden camera in the rain forest, letting them record animals' candid reactions.

It's worth noting that mirrors aren't a perfect test of self-recognition, since they favor highly visual species like primates over scent-centric animals like cats and canines. Still, the results are both funny and fascinating, as seen in the compilation video above, which was recently produced by Caters News and has quickly gone viral, racking up 19 million YouTube views in less than two weeks.

A silverback gorilla seems to regard his reflection as a rival, for example, while a mandrill nearly jumps out of its skin and leopards vary between aggression and curiosity. But perhaps the most interesting responses came from chimpanzees, whose initial belligerence gradually gives way to enchantment.

Here's one of Brierre's original videos, released in January, that illustrates how local chimps transitioned from aggressive displays to "self-directed behaviors":

These experiences may be stressful for some animals, although most seem to get over the initial shock pretty quickly, even if they never quite understand what they saw. A few become fixated, like the chimps that lined up as if the mirror was a drive-in movie screen. And some go even further, including a female leopard that mistook her reflection for a male and spent four days trying to seduce him.

When the mirror was temporarily removed for repairs, it became clear some animals were obsessed with it, Brierre writes. The video below, released last month (with speech bubbles for some reason), shows chimps and leopards waiting around and eventually rejoicing when the mirror reappears.

Related on MNN:

Russell McLendon ( @russmclendon ) writes about humans and other wildlife.