When a 49-year-old man went into hospital after trying to commit suicide, police searched his home and found indecent material on his computer.

Some were protected by passwords but Sean Richardson handed over one and had agreed to disclose others, said Paul Whitfield, prosecuting at Worcester Crown Court.

Richardson, of Lansdowne Close, Malvern, pleaded guilty to making indecent photographs and to possessing nine examples of extreme pornography. There were a total of 172 of children in categories A, B and C and some were movies.

Richardson, employed by a Malvern technical firm, admitted he had built up the collection between 2004 and 2014. In interview, he admitted that he knew what he was doing was wrong but he was stimulated by pictures of children as young as eight. He had lost his job.

Jason Patel, mitigating, said Richardson had been treated in hospital when he had taken an overdose. He was prepared to take part in a community sex offender group programme.

Judge Michael Cullum said pornography was not a victimless offence. It was a vile trade and without consumers there would be no call for children to be exploited.

He ordered Richardson to enrol on the sex offender programme and to register as a sex offender for five years. He made a sexual harm prevention order with a proviso that he should not access the internet for ten years. He was ordered to .pay £350 costs.