Joseph Dean Bailey, 30, trawled the internet for sickening images of children and was caught out when police turned up at a property in Scarborough on an unrelated matter, York Crown Court heard.
During a search of the property, belonging to a woman known to Bailey, they found his mobile phone which had "slipped under the bed", said prosecutor Rachael Landin.
They found his Google accounts, "casual-sex photos" and a dating app on the phone whose data revealed Bailey had been downloading the vile images for a period of seven months.
RNLI issue weever fish warning for Yorkshire coast
Scarborough officially smashes temperature record as Met Office confirms new hottest day
Seafret shrouds Scarborough for two days while rest of coast basks in sunshine
Whitby Regatta 2022: Red Arrows unable to display over town as sea fret rolls in
Whitby Regatta 2022: 25 of the best photos as event goes ahead despite sea fret disruption
Police also discovered text messages sent by Bailey to others including a chat thread in which he told a "casual-sex contact" he wanted to meet up with her, "in between which he searched for indecent images", said Mrs Landin.
Analysis of his phone showed that Bailey had downloaded 93 indecent images including 10 rated Category A – the worst kind of such material.
Mrs Landin said the children in the photos ranged from three to nine years' old. Police also found three images of "extreme pornography" on the phone.
Bailey, of St Nicholas Street, was taken in for questioning but claimed he had no knowledge of the images.
"He said he had been struggling with life in general and taking Valium which affected his memory," added Ms Landin.
"He said he couldn't understand how it was that the images were found on his phone."
Bailey was charged with three counts of making indecent images of children between October 2019 and May 2020, but initially denied the allegations.
He finally admitted all three charges on the day his trial was due to be held in June. He appeared for sentence on Thursday July 14.
The court heard that Bailey had previous convictions for offences such as cannabis possession but none for sexual matters.
Defence barrister Catherine Duffy said Bailey lost his job as a carpet fitter in 2020 due to the Covid pandemic and started using drugs "excessively" and drinking heavily.
"At the time, he was taking a cocktail of different drugs: Valium, amphetamine, Ecstasy and anti-depressants, taking drugs every day," she added.
She said Bailey was still in a relationship with his partner who was standing by him.
Judge Sean Morris reminded Bailey that he had been warned at a previous hearing that he was putting his liberty at stake by failing to admit his guilt and taking the case to the brink of a jury trial.
He said that new prosecution evidence "demonstrates that you would have run with this case were it not for the fact that the evidence cornered you and left you nowhere to run".
Mr Morris added: "You played the system and you failed."
Jailing Bailey for 10 months, the judge said he had shown a lack of remorse.
Bailey was also placed on the sex-offenders' register for 10 years and made subject to a five-year sexual-harm prevention order to curb his internet activities and contact with children.