Tony McEwan was found in contempt of court because a picture of Sheriff Derek Livingston conducting business at Paisley Sheriff Court appeared on his Facebook page.
McEwan had been at the court for a civil case in the summer, but a photograph taken of Sheriff Livingston on the bench mysteriously appeared on his site with a caption.
Contempt proceedings were raised after the sheriff became aware of the offending image and McEwan was back in court yesterday to hear Sheriff James Spy accept he didn't put it up.
The sheriff then criticised him for not taking the image down.
Referring to recent cases in Kilmarnock and England where people were jailed for contempt of court, he said: "The taking of the photograph was a breach of court procedure."
He warned social media users who break rules banning photography in courts that they will be "dealt with seriously by periods of imprisonment."