A student who was caught with more than 1,000 images of underage girls has been given community service.
Jonathan Wright, 19, admitted to police he had downloaded them for the "thrill" when he was arrested in November last year.
Edinburgh Sheriff Court heard the teenager had wanted to see if the images were real and admitted he liked doing something "dangerous".
He has been ordered to carry out 200 hours of community service.
Sheriff Alistair Noble also placed him on probation for three years and ordered him to be on the sex offenders register for the same period.
The court heard that the Edinburgh University student downloaded the images after a "relationship breakdown".
Police acted on a tip-off and initially went to Wright's family home in Aberdeen but later traced his laptop to his student residence in Edinburgh.
The officers found he had 1,005 indecent images and 46 videos mostly involving girls aged between 10 and 13.
Wright, admitted possession of the images between 26 August and 17 November last year.
His not guilty pleas to taking or permitting the images to be taken and intending to distribute the images were accepted by the Crown.
Defence lawyer Colm Dempsey said first offender Wright had been drawn into the offence because of a traumatic relationship breakdown.
He said: "He initially engaged in looking at adult pornography which deteriorated to looking at these images.
"Initially not appreciating the consequences he has now found a greater understanding through the help given through a chartered psychologist.
"He now seems to understand this is not a victimless crime, his involvement precipitates a demand for this type of material."
Mr Dempsey added that although custody was appropriate in this case Wright had no previous convictions and had deleted the majority of the images, which were for his personal use, after he viewed them.
He added that his actions were at the lower level for this type of offence.