A pervert was snared with child abuse videos after uploading his sick collection to his Facebook account.
Salvatore Di Pietro, 48, accessed thousands of images of kids as young as one-year-old being sexually exploited.
Police swooped on his home address in Edinburgh after learning he was storing sordid material on social media.
Di Pietro faces a prison sentence after pleading guilty at the city’s sheriff court on Tuesday to possessing indecent images of children.
Fiscal depute Matthew Miller said Di Pietro had been living in a multi-occupancy flat where he rented a bedroom.
Mr Miller said: “Police Scotland received information that indecent images of children were being uploaded to the internet via Facebook.”
The prosecutor said the social media account was under the names ‘Toni Peppo’ and ‘Salvatore Di Pietro’.
Mr Miller said police learned the images had been “accessed on a number of occasions” and an IP address linked to Di Pietro was used.
The court heard police were granted a warrant and raided the accused’s flat in the city’s Calders area.
A laptop and hard drive belonging to Di Pietro were seized and later analysed by cyber crime experts.
Between the two devices, 71 inaccessible and one accessible videos were found at Category A - the worst level - and 382 inaccessible images.
At Category B there were one accessible and seven inaccessible videos and 203 inaccessible images.
At Category C there were three accessible videos along with 4077 inaccessible and 24 accessible images.
Mr Miller said the material across the categories involved boys and girls aged approximately one to 15.
He said one file name described a “pre-pubescent girl” being raped by an adult man.
Di Pietro pled guilty to possessing the material between September 25 2017 and August 5 last year, the day of the police raid.
Sheriff Robert Fife deferred sentence until next month for reports.
He told Di Pietro: “This offences is obviously very serious. All options will be available to the court, including a custodial sentence.”
Di Pietro was placed on the sex offenders register.
Don't miss the latest news from around Scotland and beyond - Sign up to our daily newsletter here.