Photo may have been deleted

Getty Images

Kodak Black has worked hard to improve his public image following his release from prison earlier this year. But the troubled rapper was dealt a setback when he violated the terms of his probation by failing a drug test.

The 24-year-old rapper, born Dieuson Octave in Florida, violated the terms of his supervised release in his federal gun case by failing a drug test, TMZ reports. And now Black is ordered to get treatment.

The rapper, who legally changed his name to Bill K. Kapri in 2018, was sentenced to 46 months behind bars in the gun case in late 2019.

Photo may have been deleted

Getty Images

However, he was released from prison by outgoing President Donald Trump when his sentence was commuted back in January.

Kodak was back in a courtroom hearing this week after violating the terms of his supervised release.

According to court records, obtained by TMZ, the judge ordered Kodak to complete a 90-day stint in a residential drug treatment program. TMZ sources say Kodak has already enrolled in the drug treatment program.

Kodak's lawyer, Bradford Cohen, declined repeated requests to comment on his client's latest legal trouble.