New York City has unanimously passed legislation that makes revenge porn a crime.

The city council voted on Thursday to make it a misdemeanor to disclose, or to threaten to disclose, the intimate images of someone without their consent and with the intent to cause harm. The act will be punishable of up to 1 year in prison, a $1,000 fine, or both.

One in 8 Internet users in the U.S. has been a victim of non-consensual pornography, defined as the distribution of sexually graphic images of someone without his or her consent, according to a study from the Cyber Civil Rights Initiative.

Currently, there is no federal revenge porn law, but 38 states and Washington D.C. have enacted laws against revenge porn. New York's state effort has been stalled.

In 2014, Governor Andrew Cuomo signed a bill pertaining to unlawful surveillance, making it illegal to spread pictures or videos of someone engaged in sexual acts that was taken without consent.

Related: To combat revenge porn, Facebook wants some users to send their intimate photos

But that doesn't protect those who've taken images of themselves naked, or in sexual acts, and sent them to a partner.

New York City's bill aims to provide a "very clear road map" for civil courts, said Councilman Rory Lancman at a press conference ahead of the vote. Mayor Bill de Blasio supports the measure. Pending his signature, the civil portion is effective immediately; the criminal portion takes effect 60 days after becoming law.

It does so by giving individuals explicit permission to seek an injunction, and the opportunity to seek compensatory and punitive damages, as well as attorneys' fees, said Lancman. He introduced the bill with Councilman Dan Garodnick in 2016.

"For years, prosecutors have been frustrated by our inability to effectively respond to a problem we see with increased regularity," said Eric Rosenbaum, assistant district attorney in Queens County, at Thursday's press conference. "Special victims and computer crimes prosecutors across the city are hopeful that would-be offenders will now be deterred from engaging in this conduct."

Some advocates for a revenge porn law are unsure the new bill will be as effective as it intends to be. The "intent to cause harm" isn't always evident or provable in revenge porn cases, they say.

"New Yorkers deserve a non-consensual porn criminal law ... and that protection should be regardless of the motives of the offender," said New York based attorney Carrie Goldberg, who specializes in sexual harassment crimes.

Goldberg said the law was a good start.

"Even if the language leaves much to be desired and gives defense attorneys a lot of ways for their clients to escape liability, the bill does have excellent civil measures borrowed from our pending state bill that makes it so lawyers like I can sue if our clients are the victims of non-consensual porn," she said.

Related: Australia takes on revenge porn

Laws against online harassment, including revenge porn, are notoriously weak. For some victims, copyright law has been the only way to get their naked pictures off the Internet — meaning they need to copyright their naked bodies.

The vast majority of non-consensual pornography impacts private citizens, but the issue has made headlines when celebrities have become victims. For example, news surfaced in March 2017 that an ex-boyfriend of actress Mischa Barton was shopping around sexually explicit photos of her. In June, Barton won her case. The court ordered her ex to hand over any explicit videos and images.