A man who threatened to post a photo on Facebook of his former girlfriend as she showered was spared a jail sentence.
Instead, Stewart Black, 28, was ordered to perform 180 hours’ unpaid work in the community.
Sheriff Ian Anderson also issued a non- harassment order on Black for five years during proceedings on Monday.
The court heard Black had bombarded the woman with almost 700 text messages and more than 80 phone calls over a two-week period.
Dundee Sheriff Court heard the woman was too afraid to go home unless accompanied.
Depute fiscal Muhammad Sadiq told the court the couple had been in a relationship for eight years until March, when she asked him to move out.
He added: “At 4am on April 20, she received a message containing an image on her mobile phone from the accused.
“The image was a picture of her in her shower. It was clear she was unaware the picture was being taken.
“Within the text of the message, he threatened to post the picture on Facebook.”
He added: “She received 82 calls from withheld numbers and a total of 682 text messages from various additional numbers.”
Black admitted engaging in a course of conduct that caused the woman fear and alarm between April 20 and May 5.
Sentence had been deferred until yesterday for consideration of a Crown motion for a non-harassment order, which the sheriff granted.
Solicitor Ross Bennett told the court the case had created considerable interest in the media and on social networking sites.
However, he said the woman had not been naked.
“His position is that it was a joke and he had no intention of posting it on the internet site. But he accepts he shouldn’t have done it.”
Sheriff Ian Anderson said: “The threats made to your former partner must have been very frightening.
“However, you have been out of trouble for some time so it is not necessary to impose a custodial sentence.”