Prime Minister Prayut Chan-o-cha has slammed a controversial online promotion for Lazada that some people regarded as being offensive to the monarchy as "unacceptable".
The government has decided to seek court orders to block access to the advertisement.
Speaking to reporters at Government House on Tuesday, Gen Prayut said: ''Is that the right thing? Can we accept it? Can the media accept it? If you can't, neither can I. Then, let the law take its course.''
He also urged the media to focus its attention on publicising positive things while material that causes conflict should be kept in check.
Minister of Digital Economy and Society (DES) Chaiwut Thanakamanusorn said he had instructed related agencies to examine and gather evidence from all online platforms, including global giants Facebook, Twitter and YouTube, in order to request the 42 URLs identified so far be taken down.
Those platforms have been asked to remove or block access, he said, adding the ministry would seek court orders if the platforms refuse to cooperate.
Mr Chaiwut also said Srisuwan Janya, secretary-general of the Association for the Protection of the Thai Constitution, an activist group, on Tuesday lodged a complaint with the DES, asking it to pursue legal action against all parties involved in the video ad.
"Whether the Lazada platform will be closed will be considered in court,'' Mr Chaiwut added.
Transgender influencer Aniwat Prathumthin, better known by her online alias of Nara Crepe Katoey, was contacted by media agency Intersect Design Factory Co to perform in the ad, which was shown on her TikTok account.
The video features Nara and a wheelchair-bound woman, identified as Thidarat Chaokuwiang, joking with each other.
The online advert drew fierce criticism from many netizens, who saw them as mocking the disabled.
Some also believed the outfit worn by the disabled character was an oblique reference to the royal family.
Commenting on the controversial ad, army chief Gen Narongphan Jitkaewtae on Tuesday emphasised that the army is duty-bound to protect the royal institution.
"Everyone has their rights and freedom, but they must also respect other people's rights and freedom. When they have crossed the line, they must accept responsibility," Gen Narongphan said.
On Monday, the army chief issued an order prohibiting all troops, units and organisations under his command from buying products sold through Lazada's online platform in protest against the promotional video claimed to contain a slight on the royal family.
After the army's ban, the Royal Thai Armed Forces (RTARF) headquarters, air force and navy also reacted to the online promotional advert late on Monday night.
Gen Chalermpol Srisawat, chief of the defence forces, was said to have reminded personnel that they must comply with the military code of ethics and maintain their strong allegiance to the nation, religion and the monarchy.
Air force spokesman AVM Boonlert Andara said that air force personnel and their families had been asked to think carefully in future before buying products through Lazada's online platform.
Navy chief Adm Somprasong Nilsamai was also reportedly concerned, asking that people view the ad with a degree of discretion.