China’s legislature has enacted a law to criminalize the uploading of photographs containing people dressed in costumes based on the defunct Imperial Japanese Army.

The law was unanimously approved by the Standing Committee of the National People’s Congress on Friday. It will take effect on Tuesday.

The move followed a spate of cases last year in which such photos were taken at locations related to the war of resistance against Japan and uploaded to the internet.

Some critics say that the spread of such activity reflects public frustration with the Communist Party of China’s one-party rule.

At a news conference in March, Chinese Foreign Minister Wang Yi blasted those who enjoy wearing costumes as human scum.

The new law is aimed at preserving the dignity of Chinese heroes sacrificed in the China-Japan war and other battles, and maintaining the spirit of patriotism.

Under the law, those who deny the heroes’ achievements or glorify acts of aggression against China could face criminal punishment.

The war between the two countries later evolved into World War II.