A Cardiff deputy head teacher who secretly filmed pupils going to the toilet has had his "manifestly excessive" five-year jail term cut to four by the Court of Appeal.
Gareth Williams, 48, admitted 31 charges including nine of voyeurism and 20 of making indecent photos at a hearing in Cardiff Crown Court in May.
Ysgol Glantaf teacher Williams was caught in an international police operation against child sex abuse.
The hearing took place in London.
Three judges upheld the sentence challenge by Williams and reduced it by one year.
Mr Justice Green said Williams had installed recording devices in toilets, showers and changing rooms to get images of boys for his "obsessive" gratification.
Police initially began investigating Williams as part of Project Spade, an investigation by Canadian police which swiftly became international as material was shared with forces around the world.
He had downloaded child sex abuse images, but police also found the recordings of pupils made at the school where he taught and in other properties using pinhole cameras, the judge said.
More than 30 boys were captured on film by Williams.
When arrested, Williams said he had been examining images of boys for 10 years to help understand their physical development, but admitted a long-standing interest in boys and accepted being fixated by them.
David Elias, Williams' counsel, argued the sentence was too long especially given his mitigation, and argued the cataloguing of the images by age supported Williams' claim he was at least in part interested in children's physical development.
Mr Justice Green, sitting with Sir Brian Leveson and Mr Justice Goss, said: "We conclude that the overall sentence imposed was manifestly excessive.
"We also conclude that insufficient weight was attached to the mitigating features, in particular the devastating impact which the appellant's conduct has had upon his personal life.
"In these circumstances, we quash the sentence of five years' imprisonment and substitute one of four years' imprisonment."