You are looking at this as a man and not as a woman.
It is very psychologically damaging for a woman to go through this and is as bad as a rape or someone ruining your name and a reputation complete with PST. Women have a hard time as it is and something like this showing up in a employer background check or a guy you want a date and male friends can ruin your life.
Or in other words how would you like if you went to the john at work and I snapped a photo next to you with my phone and posted it everywhere? Not illegal kind of extortion maybe?!
I would hope the later if you had self respect. Yes it is illegal as this is not public by any sense of the means and did harm.
This guy deserves what he gets.