A teacher who was arrested after a colleague found child abuse images on his laptop has been jailed for a string of offences.
Police found more than 26,000 indecent images of children, including more than 4,000 showing the worst level of abuse, when they seized 33 devices from 32-year-old Jamie Wheeler.
They also discovered a "paedophile manual" that detailed how to groom children.
Wheeler, previously of Riccall near Selby, but now of Kippax, Leeds, pleaded guilty to 22 offences, including possession of the paedophile manual, making indecent images of children, sexual touching, causing a child to engage in sexual activity, taking indecent images of a child and meeting a child to engage in a sexual act.
Det Con Claire Hudson, of York and Selby CID, said the images were "sickening and very distressing".
She added: "While we did not identify any evidence that he was directly involved in the worst kind of sexual offending, we did identify direct offences of sexual touching and other grooming offences.
“When his offending was discovered, we worked with our partner agencies to ensure immediate safeguarding measures were put in place, including his suspension from his job and conditions imposed to prevent any contact with any children."
Wheeler was jailed for four years and 10 months, ordered to sign the Sex Offenders Register indefinitely and given a 10-year sexual harm prevention order.
Want a quick and expert briefing on the biggest news stories? Listen to our latest podcasts to find out What You Need To Know.