An Oregon man who reportedly photographed JonBenét Ramsey just months before her unsolved 1996 murder — and was later arrested for walking down a street naked, muttering “I didn’t kill JonBenét” — was indicted this week on child porn charges.

Randall DeWitt Simons, 66, was arraigned Thursday following a year-long investigation by the Oakridge Police Department, according to The Register-Guard.

He had been taken into custody on July 2, with authorities executing a search warrant on his home just days earlier — which turned up four laptops, three camcorders, two bags of writable optical discs and six cameras.

Cops had been tipped off by workers at a local A&W Restaurant back in July 2018, who had noticed that someone was using their WiFi to download x-rated content, the Register-Guard reports.

Investigators traced the activity back to a computer identification address belonging to a man who lived near the restaurant. They reportedly learned that he sold the computer, along with several others, to Simons — who also lived nearby.

Using a special software program, authorities were able to see Simons log into the A&W WiFi system and tracked the activity back to his home. They executed their search warrant on June 27.

Simons later told cops that he was a children’s photographer, and they promptly notified local parents to see if he possibly shot their kids or left them alone with him, the Register-Guard reports.

The alleged kiddie porn collector made headlines in 1998 when he was arrested for indecent exposure in Lincoln County, Colorado, for allegedly walking down a road naked.

“I didn’t kill JonBenét,” he told his arresting officer, according to the Associated Press.

The incident happened less than two years after the child beauty queen was murdered.

Simons, who was never declared a suspect, had also drawn attention to himself in 1997 — when he sold a portfolio of glamour shots that he took of JonBenét to a photo agency for over $7,000. The shutterbug claimed that he was only trying to bring more attention to the case.

“My career is done,” he told reporters at the time. “I’ll probably never work again.”

Simons was held in jail after the indecent exposure incident and ordered to undergo a psychiatric evaluation, though it’s unclear what happened with his case. Attempts to reach the sheriff’s office in Lincoln County, where he was arrested, were unsuccessful.