A paedophile collected 300,000 indecent pictures of children in 10 years, the High Court in Glasgow has heard.
Steven Howie, 45, of Giffnock, admitted possessing and downloading images between 1999 and 2010.
Police searched his home on 5 March after receiving a tip-off. During the search Howie told police he had "thousands" of downloaded images.
A total of 305,919 indecent images and videos were found on a computer, laptop, memory stick and disks.
Prosecutor Tim Niven-Smith said Howie was asked if there were any indecent images of children on the computer and how many there were. Howie, who is unemployed, told police, "we are talking thousands".
Mr Niven-Smith said: "The main desktop computer seized from the house was forensically previewed by the police.
"During the preview a number of indecent images and video clips of male and female children were found."
Mr Niven-Smith added: "Access to websites relating to teenage modelling was identified."
Defence counsel Lorraine Glancy told the court Howie was a first offender and asked for bail to be continued.
Judge Lord Bonomy QC granted bail and deferred sentence to Edinburgh on 26 January.