A former Playboy playmate criminally charged after secretly taking a photo of a naked woman at a Los Angeles gym and snarkily uploading it to Snapchat pleaded no contest on Wednesday and was sentenced to probation and community labor.

Dani Mathers, 30, will be under probation for three years and must complete 30 days of local graffiti cleanup, according to a court clerk.

Mathers was charged in November with one count of invasion of privacy in the July incident, in which the 2015 Playboy Playmate of the Year snapped a photo of the nude 70-year-old and posted it to Snapchat with the text "If I can't unsee this then you can't either."

"She really apologizes from the bottom of her heart for what happened," Mathers’ attorney Thomas Mesereau said outside of court. "She never thought this would come out like this. Never intended to hurt anyone."

Model Dani Mathers, center, in court with her attorney during a hearing in Los Angeles on May 24, 2017. Frederick M. Brown / Getty Images

Mathers’ post elicited criticism from those who said she was “body shaming” the woman.

Mathers deleted the post and apologized, saying that she only meant to send the picture to a friend rather than share it with her thousands of followers. She said at the time that she took full responsibility for her actions.

Experts said it was one of the first times someone had been criminally charge in connection with body-shaming in a social media post.

"This is a very important case with an extremely forceful message associated with it: That body shaming is not tolerated in our city," Los Angeles City Attorney Mike Feuer said at a news conference after the plea.

The charge carried a maximum penalty of up to six months in jail and a $1,000 fine, he said at the time that criminal charge was announced.

Feuer said that when he heard about the case he was "incredulous" that taking a photo under the circumstances was against the law, distributing it online was not. He said the state senate recently passed a bill that would make those who distribute such photos subject to a fine and restitution to pay for its removal from the internet, and is hopeful the assembly follows suit.

Mathers will also have to pay the victim $60 for a new backpack, because she could be recognized by the one seen in the photo, officials said.

"Body shaming can devastate its subject," Feuer said. "People are mocked, they’re humiliated and in ways that they can never fully get back."