(CNN) Singapore has criminalized the sending of unsolicited intimate images, or "cyber flashing," as part of a major crackdown on sexual harassment online.

The city state's parliament approved reforms to its criminal law on Monday, also including other new offenses for upskirt photography, and sharing or threatening to share sexual images, so-called "revenge porn."

Anyone found guilty of "cyber flashing" could receive a custodial sentence of up to two years, while taking upskirt photos or videos is punishable by up to to two years in prison -- five years if the images are shared online. Courts can also impose fines and canings for offenses, common punishments in Singapore.

"There has been prevalence of this. Persons intentionally send unsolicited pictures of their genitalia over social media or via messaging platforms. That will be criminalized. Penalties for that offense will be enhanced where the victim is below 14 years old," said K Shanmugam, Minister for Home Affairs and Minister for Law in Parliament.

The changes are part of a sweeping reform of Singapore's Penal Code. Lawmakers seeking to overhaul the code have also recently made recommendations to remove immunity for marital rape, and to decriminalize suicide.

Read More