A former wind turbine boss caught with more than 20,000 child abuse images has avoided a prison sentence.
Company manager John Spink’s computer equipment also contained more than 100 videos of children being abused.
Dundee Sheriff Court was told the 45-year-old from Arbroath had been sacked when the offences came to light.
Spink was told by a sheriff he would have gone to jail but for the fact he was suffering from undiagnosed post-traumatic stress disorder at the time.
The court heard that Spink, who has a previous conviction for assault to severe injury, had computer equipment seized by police following a tip-off.
A forensic examination revealed more than 20,000 still images and more than 100 videos of child abuse, some at the most severe level, as well as two “extreme pornography” videos of bestiality.
He admitted downloading indecent images of children and possessing extreme pornography at his home between April 2015 and February 2016.
Defence solicitor Nicola Brown said: “He has obtained new employment in Norwich if he avoids custody today.
“He will not go offshore or travel outwith Britain in that employment.”
Sheriff Alastair Brown imposed a community payback order with two years supervision and ordered Spink to take part in a sex offenders rehabilitation programme.
He said: “Ordinarily possession of indecent photographs of children in the fairly large quantities that you had would result in a prison sentence unless there are exceptional circumstances.
“In your case I find that there are exceptional circumstances in the fact you had an undiagnosed psychiatric condition.
“I am satisfied that you were behaving as otherwise than you would have and that that was attributable to the psychiatric condition.
“Every single one of these images represented the actual abuse of a real child and to that extent it is deplorable.”