A measure to criminalize what's known as "revenge porn" -- nude or sexual images of people posted online, often by ex-partners -- has advanced in Pennsylvania's Senate.

But even if the bill, passed Tuesday by a Senate committee, becomes law, questions remain about its effectiveness and constitutionality.

Only New Jersey and California have tried to outlaw revenge porn.

Pennsylvania's current harassment law hasn't given victims of the harassment any recourse in such circumstances.

State Sen. Judy Schwank of Berks County said that would change with her proposal.

"By passing this legislation, we'd be able to ensure that we'd at least deter this kind of behavior, or to prosecute individuals that try to harm people in this way," said Schwank, D-Berks.

It's not clear that laws against revenge porn have led to successful prosecutions, according to legal experts.

The proposal defines revenge porn as having "no legitimate purpose and with the intent to harass, annoy or alarm the person depicted."

It's not as high a threshold as the one in California's law, but Schwank acknowledged it may make revenge porn tough to prove in court.

Privacy advocates, meanwhile, caution the difficulty of criminalizing revenge porn without restricting free speech.

The American Civil Liberties Union of Pennsylvania has taken a neutral position on Schwank's measure.