2014’s “Celebgate” (in which cloud computing accounts associated with mobile phones of various celebrities were hacked and posted online) has raised awareness of the problem of the posting of intimate photographs without the consent of the subject of the photographs. If you take a photograph of yourself, you own the copyright in it. This means that if you take a photograph of yourself doing something stupid (or something that, while not stupid in itself, you really don’t want anybody to see other than the person you’re doing it with), you can in principle control the distribution of the image. This can come in very handy when the person you sent the photograph to posts it online, or threatens to do so. Copyright infringement is easy to prove in these circumstances, and social media sites tend to take allegations of it seriously (and have formal mechanisms for taking down infringing content).
If someone other than you takes the photograph, you may still have a legal claim for misuse of confidential information or defamation, but these are more complex areas of law. Misuse of confidential information requires proof that the person in possession of the image knew, or should have known, it was confidential. A defamation action would need proof that posting the photograph suggests that you consented to its distribution.
While it may be better to take embarrassing photos yourself than to let anyone else take them, the golden rule is never let anyone have possession of that sort of photograph unless they have more to lose than you do if it goes viral.