A man has been sentenced to 30 days in prison after filming himself licking a tub of ice cream in Walmart before returning it to the freezer.

24-year-old D'Adrien L'Quinn Anderson filmed himself licking a tub of Blue Bell ice cream in Port Arthur, Texas and uploaded it to Facebook and Instagram.

Anderson pleaded guilty to misdemeanour criminal mischief in January and faced the possibility of one year in prison and a $4,000 fine.

Although he said the the video was just a joke, the The Jefferson County District Attorney's Office said they saw the incident differently to the 24-year-old.

"Anderson's actions caused public concerns about the safety and quality of consumer products offered for public consumption, impacted Blue Bell consumer confidence and caused the company financial loss. This type of activity will not be tolerated," their statement said. ​

"The Jefferson County District Attorney's Office and the Port Arthur Police Department want the public to know that such cases will be taken seriously and appropriate criminal charges will be filed."

Blue Bell Creameries, the company behind Blue Bell ice cream had to replace all of the ice cream that were in the display at the time of the incident, costing them $1565.00, according to the attorney's office.

Anderson claimed to have later paid for the ice cream, but without a proof of purchase his claim could not be backed up.

Walmart echoed the the attorney's office in a statement to ABC, saying that jokes similar to Anderson's will not be tolerated.

"If food is tampered with, or a customer wants to leave the impression that they left behind adulterated product, we will move quickly with law enforcement to identify, apprehend and prosecute those who think this is a joke – it is not."