A man has pleaded guilty to voyeurism and making or possessing more than 300 indecent images of children.
Carl Beech, 50, formerly of Gloucester, admitted the offences on day one of his trial at Hereford Crown Court.
The offending pictures - including 36 at Category A, denoting the gravest abuse imagery - were found on three electronic devices belonging to Beech.
The voyeurism offence relates to Beech secretly filming a boy while he was using a toilet.
In total, Beech admitted four counts of making indecent images of children, one of possessing such images, and one count of voyeurism.
The defendant, who was remanded in custody, will be sentenced at a later date.