Online trolls who deliberately share flashing images in order to harm people with epilepsy face imprisonment under a first-in-the-world law now in force in England and Wales.

The measure, which has been dubbed “Zach’s law”, forms part of the new Online Safety Act which also criminalizes cyber-flashing, revenge porn and fake news.

It follows a campaign launched after a young boy’s online fundraiser for the Epilepsy Society was targeted by trolls who posted images and GIFs designed to trigger a seizure for people with epilepsy.

While Zach Eagling, then eight years old, was not harmed, a number of people around the world reported having seizures after viewing the images.

Clare Pelham, chief executive of the Epilepsy Society, said: “In this country we have a fine tradition of standing up to bullies.

“And with this new offence, Zach’s law, the government is offering the full protection of the criminal law to people with epilepsy who are deliberately assaulted by flashing images sent by cowardly bullies.

“We are the first country in the world to do this and the Epilepsy Society has already been contacted by victims abroad who hope their governments will follow our example.”

Technology secretary Michelle Donelan added: “From today, online abusers and trolls will be prosecuted and put behind bars for their cowardly and menacing acts – ensuring the public are protected and can have better peace of mind when online.

“Our pioneering Online Safety Act is already setting a global standard, and pivotal protections like these will keep sick individuals off our streets and unable to endanger Brits online.”