Norman Lever, a 31-year-old man got many people stunned after it was found out that he took a selfie with his p*nis in a dog's mouth.
He was caught after police recognised the patterned carpet in his home in the photograph.
According to Metro UK, Norman Lever was investigated following reports that he had been accessing child abuse images in January 2015.
But when police raided his house, they found the selfie of the man with his p*nis in the female collie's mouth.
He was immediately identified by the carpet and a distinctive tattoo on his left hand, Devon Live reports.
Lever, 31, from Kentisbury, near Combe Martin, admitted possession of extreme pornography and three counts of making indecent images of children at Exeter Crown Court.
Gordon Richings, prosecuting, said police raided the house which Lever shared with his mother on January 15, 2015, following information suggesting he had been accessing child abuse images.
Three computers were seized after Lever denied downloading any images and a total of 274 child images were also found along with seven extreme images of bestiality.
Mr Richings said: 'On closer inspection, a link was found between the defendant and the image of a female collie type dog. It was depicted in some images and there was one in particular.
'It was identified as a dog belonging to his mother and which lived in the same household as him. It showed a man's penis in the dog's mouth.
'It is being held in the hand of a man with a prominent tattoo on his left hand, which matched that on the defendant. The background showed a carpet with the same pattern as that in his house. The dog was seized.'
He added that the dog was held in kennels at South Molton from April 6 to 26, 2016 before being returned to Lever's mother.
Richard Crabb, defending, said Lever's mother had assured police and animal welfare authorities that she would not leave the animal alone with her son again.
He said Lever acted as a carer for his mother and is now unemployed after losing his job as a shelf stacker following his arrest.
Sentencing him, Judge Geoffrey Mercer, Q refused a police application to make him pay a £252 kennel bill which was amassed when the collie was taken into protective custody for 20 days.
He told Lever: 'I have to sentence you for the possession of photographs which to any right thinking person are quite repulsive. This is a serious offence.
'It is deserving of a prison sentence, but having read the probation report, I have no doubt whatsoever that the public interest is better served by you going on a sex offenders' programme.'
Lever was also ordered to sign on the s*x offenders' register for 10 years and made subject of a sexual harm prevention order for the same time.