The Playboy centerfold who took a body-shaming photo of a 71-year-old woman in the gym has learned her fate

Playboy model Danielle "Dani" Mathers leaves Los Angeles County Superior Court, Wednesday, May 24, 2017, after pleading no contest to charges that she secretly snapped a photo of a naked 71-year-old woman in a locker room and posted it online with a mocking comment. She was sentenced to probation and 30 days community service. (AP Photo/Reed Saxon)

LOS ANGELES (AP) — A Playboy centerfold was ordered to clean up graffiti Wednesday for secretly snapping a photo of a naked 71-year-old woman in a locker room and posting it online with a mocking comment.

Videos by Rare

Dani Mathers pleaded no contest to misdemeanor invasion of privacy in Los Angeles County Superior Court for the case that sparked outrage over the incident of so-called body shaming.

Mathers, 30, had previously 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.

RELATED: Body-shaming Playboy Playmate learns the future of the court battle to clear her name

Mathers 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.”

Under terms of the plea, Mathers will be on probation for three years and must not take photos of people or post them online without their permission.

She was ordered to either serve 45 days in jail or 30 days of graffiti removal. She chose the latter.

RELATED: The Playboy model who fat-shamed a woman in the gym is finally learning the consequences of her actions

Defense lawyer Dana Cole earlier argued unsuccessfully that the charge should be dismissed because the woman in the photo can’t easily be identified.

The victim, who has not been named, had been expected to testify if the case went to trial, according to Rob Wilcox, a spokesman for the Los Angeles city attorney.

Defendants who plead no contest do not admit guilt but do not dispute the charges and are convicted.

What do you think?

This rising country star isn’t letting major success go to his head

Toddler falls victim to classic “got your nose” prank and loses his mind in the process