A serial sex offender has been given a community order after he told York magistrates he was a reformed character.

David Stansfield, 48,  had previously served a prison sentence for what a judge called his “vile addiction” to indecent images of children.

York magistrates heard that since 2016, Stansfield has been subject indefinitely to a court order restricting his use of the internet and enabling police to monitor him. He is also on the sex offenders’ register.

On February 5, 2021, police on a routine visit to his home discovered a phone he had hidden from them that contained 230 indecent images of children.

Stansfield, of Middlethorpe Grove, Dringhouses, pleaded guilty to having indecent images of children of the least serious category.

His solicitor Chris McGrogan told magistrates: “The gentleman who appears before you today is in a very different position and situation to the person who committed the offences.”

Stansfield now had a full-time job with a family firm where he was welcome and had made friends and had also made friends at a car club. He had not been before a court for three years.

“There are significant number of positives that are present in his life that weren’t present three years ago," said Mr McGrogan.

Magistrates gave Stansfield a 30-month community order with a 45-day rehabilitative programme, 40 days’ rehabilitative activities and 200 hours’ unpaid work.

They also made him subject to a new indefinite sexual harm prevention order with extra provisions including one about taking lie detection tests. He will now be on the sex offenders’ register until May 2029.

Alison Whiteley, prosecuting, said Stansfield was convicted in November 2012 at York Crown Court of six charges of having indecent images of children. He was given a three-year community order with a rehabilitation programme and made subject to a court order forcing him to tell police about all his internet devices among other provisions.

In May 2016, Stansfield was back before York Crown Court for having more indecent images of children which he had tried to conceal on his phone by installing an app. This time he was jailed for 12 months and Judge Paul Batty QC said he had a “vile addiction” to indecent images of children.

In February 2021, police found he had hidden another phone from them.

In May 2021 Stansfield appeared before York Crown Court for a third time charged with breaching a sexual harm prevention order and he was given an 18-month community order with rehabilitative activities.

Ms Whiteley said Stansfield had not helped police because he hadn’t told them about the illegal contents of the phone and they had had to analyse it forensically to find them.

If he had told them, the latest indecent images charge could have been dealt with by the judge in May 2021.

Mr McGrogan said Stansfield had been “very forthcoming”.

“It is totally incorrect (to say) he had not assisted the police,” said Mr McGrogan.

In 2021, Stansfield had been isolated with no-one to turn to. He had turned to drink and space cakes.