IT’S COME TO THIS: Police post photos of suspects with Lego heads to protect IDs under new California law.

Getting arrested is no child’s play — except for these California cops.

The Murrieta Police Department has been posting hilarious arrest and lineup photos with suspects’ faces replaced by Lego heads to comply with a woke state law protecting offenders’ rights.

Images on the department’s Instagram page show the Lego blocks with a variety of facial expressions — crying, frowning, smirking or raging — digitally superimposed onto the bodies of people being busted.

One appears to show two people handcuffed in the back of a squad car — with the Lego face on one angrily looking at the other, whose toy head is crying.

Another shows five people in a lineup — completely unrecognizable because of the toy heads.

The Photoshop-savvy law enforcement agency explained Monday that it is shielding detainees’ faces to comply with a new state law prohibiting the release of mugshots and booking photos of those accused of nonviolent crimes.

The law, signed by Democratic Gov. Gavin Newsom last September and implemented on Jan. 1, also requires police departments to remove other mugshots from social media after 14 days.

Congrats Gavin — even America’s Newspaper of Record couldn’t anticipate how crazy the state would become under your watch: