A Glee producer has come under fire for paying tribute to Mark Salling, who died in a suspected suicide as he awaited sentencing for possession of child pornography.

The 35-year-old actor, best known for playing the bad-boy Noah "Puck" Puckerman in the hit musical series, was found dead on 30 January. A law enforcement official told The Associated Press that Salling was found near a riverbed in Tujunga and the death is being investigated as a suicide.

Salling had been scheduled for sentencing on 7 March after pleading guilty to two counts of child pornography back in October 2017. Prosecutors were said to be seeking a sentence of between four and seven years after Los Angeles police found 50,000 "sexually charged" images of children on his computer.

Taking to Twitter, producer Tim Davis acknowledged Salling's crimes while also mourning his death.

"Today we lost another #Glee cast member. Yes, he committed crimes against children. Yes, it's horrific. But #MarkSalling was a broken man ... I loved Mark, and am sad when I consider the devastation of his parents. PLEASE withhold your cruel comments," he wrote.

He followed it up with another post that read: "Let me be clear. Having compassion for #MarkSalling in no way minimizes his crimes, nor does it minimize the pain and devastation of the victims of those crimes," he continued. "I'm just saying stop adding to his family's pain. This was their son. If you're without sin, feel free to cast stones."

Many members of the online community took issue with Dalling being described as a "broken man" and reminded Davis that his actions did not warrant sympathy and the real victims were the children.

"Equating possession of 25,000 pictures & 600 videos of child pornography (including children as young as three) with the everyday sins of the average human is careless and appalling," one person said.

Another wrote: "To be clear #MarkSalling is THE ONE that brought and is bringing pain to his family.Just as he did to the victims and their families. Spare us the lecture."

A third added: "while I feel sad for his loved ones, how do you think the children that were victims in the videos he knowingly collected, would feel seeing him described as such? Being a 'broken man' does not remove the fact that he had a child pornography collection."

Salling's former co-star Jane Lynch, who played Sue Sylvester, retweeted Davis' message and also told TMZ she was saddened by the news of his passing.

" As the guy who made that really sweet video in the beginning of Glee when he was so happy to be a part of this group," the 57-year-old actor said. "It's tragic and I'm brokenhearted over it."