A Criminal Court in Bangkok convicted 51-year-old shopkeeper Kittithon Yamsamai under the country's controversial lese majeste legislation and Computer Crimes Act.
He was accused of writing inappropriate comments on the king's picture and posting it on the Internet as well as storing it on CDs.
The charges included "attempting to commit lese majeste", his lawyer Anon Numpa told AFP, explaining that police seized files in his computer and accused him of preparing to commit a crime.
Kittithon was given 20 months for that charge as part of a reduced sentence that took into account his confession.
More From This Section
"Government officials -- including prosecutors and investigators -- are getting tougher with these kind of allegations," Anon said.
The 86-year-old King Bhumibol Adulyadej is revered as a demi-god by many Thais and protected by harsh royal defamation laws.
Under the lese majeste rules, anyone convicted of insulting the Thai king, queen, heir or regent faces up to 15 years in prison on each count.
Kittithon described by his lawyer as a "Red Shirt sympathiser". He said his client did not plan to appeal but would seek a royal pardon.
Two months of mass street protests by the Red Shirts against the previous government in early 2010 triggered the kingdom's worst civil violence in decades with more than 90 people killed, mostly in a bloody military crackdown.
Former prime minister Abhisit Vejjajiva was indicted today for murder in relation to the deaths.