While it may be legal in some instances, it could violate right to privacy and right to publicity laws in many states. It will also cause you problems even if it is legal. For example, she may claim that you took them without her knowledge and consent which would be a he said/she said situation unless you got her to sign a release- which I doubt. My advice is to find some other avenue to vent your feelings that does not potentially violate the law. Or better yet, just move on.
Since you ask this hypothetically, I point out that you should consult an attorney before taking any actions (if you are contemplating doing so - or the person on whose behalf you ask is contemplating doing so). This is not intended as legal advice. Speaking to the subject matter and addressing only the legal questions for thought and consideration as you request, it seems to me that the question turns (as a very brief summary) primarily on whether the subject of the photo granted the poster permission to use the photo publicly. I would certainly say that one should not publish such a photo without permission and, absent a clear permission to use the photo as you hypothesize, the advise of counsel with whom all the facts can be discussed. Individuals have a right to privacy and to the protection of their name and likeness. Even if the person posed for the picture willingly, absent a written consent to publish it or some facts which are not in your question suggesting that the photo was taken in an open and notorious place where the subject would have no reasonable expectation of privacy, publishing the photo would likely violate the subjects right to privacy (and possibly, depending on where it is posted, the nature of the relationship with the ex posting it, etc... claims such as intentional infliction of emotional distress and other similar torts). If the photo were to be published on a commercial site as some of my other colleagues note, then the subject may have a claim for misappropriation of name and likeness, among others. As a general rule again, I would not publish a picture (even if I took the picture and owned the copyright in the photo) UNLESS I had either a thorough release from the subject (especially a naked picture - which I imagine was likely taken either by surprise or with the expectation of privacy - but would need more facts to properly discuss) or on advise of competent counsel who knows all the facts and counsels on a legal basis and way for doing so.