A drug addict who used to spend £200 a day on cocaine looked at sexual images of children.

Ryan Parker, 39, of Whalley Road, Blackburn, said that his offence of looking at indecent images of children was "one million per cent" down to his alcohol and drug addiction.

Burnley Crown Court heard that on March 29 last year, Lancashire Police attended Parker's home address as they had evidence he had been looking at child pornography.

Prosecutor Stephen Parker told the court that the defendant had allowed the police into the address, and admitted to looking at the images under the influence of drugs.

When the police searched the house, they found empty snap bags believed to have contained drugs.

Parker handed over his laptop, mobile phone, and passwords to the devices including to the iCloud database.  

The court heard that when the police investigated the devices, they found 506 images of children aged between five to 12 years old were viewed by Parker over a period of three years.

In mitigation, Shirlie Duckworth told the court that Parker had gone on to attend rehabilitation services for drug addiction and child pornography before he had been charged with the offence, a rare occurrence for the courts.

She said: "He is a man of previous good character in his late 30s with a lack of convictions.

"He has accepted and shown remorse for his offences, and there are many people who appear before this court who do not accept their crimes until they are forced to by the justice system."

Parker pleaded guilty to three counts of possession of indecent photographs of children.

Judge Daniel Prowse sentenced Parker to 10 months in prison, suspended for 18 months, ordered him to take 25 days rehabilitation and 150 hours unpaid work.

He said: "You had 296 of some of the most serious images for this offence.

"You admitted at the scene and provided the police with the devices and passwords you used to look at these images.

"You also engaged with members in groups such as Twitter, Gmail and Kick who then shared these images to you.

"I have read your psychiatric report and I believe you are genuinely remorseful and have taken steps to see why you accessed these images.

"I accept you were on drugs at the time of the offending, and believe your rehabilitation with the Probation Service will work better out of immediate custody.

"But if you do commit any offence again, you will immediately go to jail and you will only have yourself to blame."

Parker was also placed on the sex offender's register for 10 years and handed a sexual harm prevention order for the same period.