*Rob Kardashian may find himself behind bars for his actions yesterday involving putting Blac Chyna on blast. Actually it wasn’t that he put her “out there,” it was the way he did it.

Dude posted sexually explicit images pics of her and in the process, may have run afoul of California’s revenge porn law Wednesday.

As we reported, Kardashian, 30, posted the images as he accused her of cheating on him.

Needless to say, Kardashian may come to regret his hastiness to try and embarrass her with the posts because in 2013 California lawmakers passed a law penalizing what is known as “non-consensual pornography.”

A violation of the law is a misdemeanor resulting in up to six months in jail. Are you listening, Rob K?

“This is, in many ways, exactly what the revenge porn law talks about,” Louis Shapiro, a criminal defense attorney told the LA Times. “A prosecutor here could choose to make an example of him even if she doesn’t want to cooperate.”

Anyone pursuing the case would have to show that Blac Chyna did not consent to distribution of the images and that they were intended for private use, he said.

RELATED NEWS: WHAAAT?! ROB K REVEALS T.I., TINY, BLAC CHYNA 3-SOMES; SNOOP CALLS HIS POSTS ‘SUCKER SH*T’

rob kardashian & blac chyna

Here’s the backstory:

In a series of Instagram posts, Kardashian claimed Chyna had sent him the images. Kardashian later deleted the explicit images from his account, where he had repeatedly accused her of infidelity.

Kardashian took to Twitter about 12:35 p.m. to state that his Instagram account had been shut down, and he resumed posting other images, including a very explicit one, he claimed were of Chyna. The most explicit image eventually disappeared from his Twitter account.

Shapiro also said Kardashian could get in trouble whether Chyna wants to pursue a case or not, however he said proving a criminal misdemeanor case without the victim’s cooperation would be difficult.

“As his attorney, I would tell him to immediately delete all the messages because it could be perceived as a motive for the explicit images,” Shapiro confided.

Meanwhile, the Los Angeles County sheriff’s department said it hasn’t received any complaints about his postings.

The state created a website in 2015 to help victims of revenge porn have unauthorized intimate images and other personal information removed from websites.

California has an eCrime Unit dedicated to tackling technology crime, which includes revenge porn. Here’s the key: For it to be considered a crime requires someone to intentionally and publicly distribute unauthorized nude photos knowing that they will cause emotional distress.

So we have to ask. Rob, was it worth it?