LOS ANGELES (AP) — Dani Mathers earned fame posing as a nude model. She gained notoriety on the other side of the camera when she snapped a photo of an unwitting and unwilling subject — a naked 71-year-old woman in a gym locker room.

The firestorm of criticism that erupted after the Playboy model posted the pic online to mock the woman’s body drew more attention than any centerfold of Mathers and led a judge Wednesday to order her to spend 30 days cleaning up graffiti on Los Angeles streets as punishment.

Mathers, 30, pleaded no contest to misdemeanor invasion of privacy in Los Angeles County Superior Court for the so-called body shaming case. Although she didn’t admit guilt, the plea is recorded as a conviction.

The victim, who was not in court, was humiliated by the cruel act, prosecutors said.

“Body shaming can devastate its subject,” Los Angeles City Attorney Mike Feuer said. “People are mocked, they’re humiliated and in ways they can never fully get back.”

Mathers, a petite blonde, had apologized for taking the photo at an LA Fitness club in July and posting it on Snapchat with the caption: “If I can’t unsee this then you can’t either.”

The posting was accompanied by a selfie of Mathers in a tank top with her hand over her mouth as if she’s gasping in horror.

The 2015 Playmate of the Year contended she intended to send the photo privately to a friend and accidentally posted it publicly.

The crime was amplified by the attention the photo got online and the backlash that erupted in the world of social media, which is often quicker to punish than reward. The shamer quickly became the shamed.

Mathers lost modeling jobs and work as a radio host, her lawyers said. She complained of being bullied online.

She was relieved to put the case behind her and was grateful to be spared a jail term, defense attorney Thomas Mesereau said outside court.

“She really apologizes from the bottom of her heart for what happened,” he said. “She never thought this would come out like this. Never intended to hurt anyone.”

After the case arose, Feuer promoted legislation to enhance penalties of the existing privacy invasion law for distributing partially or fully nude images without consent. The bill passed the state Senate this week.

Feuer criticized Mathers for fighting the case “tooth and nail” to avoid legal consequences. The defense argued unsuccessfully that the charge should be dismissed because the victim couldn’t easily be identified in the photo shot from a distance.

It didn’t take a great deal of detective work for the gym and police to track down the victim, said Deputy City Attorney Chadd Kim.

Mathers was ordered to pay her $60 to replace a backpack seen in the photo so the woman wouldn’t easily be identified.

Based on past conversations, Kim thought the victim would be pleased with the outcome.

Under terms of the plea, Mathers will be on probation for three years.

She must also curtail her photo-taking. She was ordered not to take photos or video of people or post them online without their permission and can’t have a camera in places where people might be naked or expect privacy.