California Gov. Jerry Brown signed a bill that would make it illegal for people to humiliate ex-lovers by posting indecent photos or videos online.

Under the new law targeting "revenge porn," distributing sexual images "with the intent to cause serious emotional distress" would carry a fine of as much as $1,000 and as long as six months in prison — even if the pictures were originally taken with consent. The law bans only images taken by the person posting them, meaning that self-photos aren't protected.

California, a center of Internet technology, becomes the second U.S. state to criminalize the act, though as a misdemeanor. New Jersey considers it a felony.