Liam Gibson, 56, of Kilbucho, Biggar, pleaded guilty at Edinburgh Sheriff Court yesterday to being in possession of the indecent pictures at his then home in Main Street, Pathhead, between November 27, 2007, and May 10, 2011.
He admitted taking images and permitting them to be taken, and to distributing them.
Fiscal depute Aidan Higgins said Lothian and Borders Police had gone to Gibson’s home with a search warrant after receiving information that his internet address was being used to download indecent images of children.
Gibson had admitted he regularly downloaded still images and movies and that he shared them with other people.
Mr Higgins said examination of a laptop computer, two external hard drives, a camera and a memory stick showed 48,584 still images and 1225 movies.
The majority of them involved boys aged between five and 14 and were at the lower end of offences, but that there were also pictures at the top end of the scale.
Sheriff Scott deferred sentence on Gibson for background reports and ordered that he register as a sex offender.