For more than a century, police departments and the news media have worked together to disseminate photos of people after their arrest.

It is a practice as old as the mug shot itself: publicizing an unflattering close-up of a person’s face and profile, taken at one of the person’s worst possible moments.

Now, in some departments and newsrooms across the country, it may be on its way out. San Francisco Police Chief William Scott announced Wednesday that his department would no longer release mug shots of people who had been arrested unless there was an immediate public safety reason to do so.

“This policy emerges from compelling research suggesting that the widespread publication of police booking photos creates an illusory correlation for viewers that fosters racial bias and vastly overstates the propensity of Black and brown men to engage in criminal behavior,” Scott said.

Many newsrooms have already started removing mug shot galleries.

Last month, dozens of outlets once owned by the newspaper chain GateHouse Media said they would stop using slide shows of mug shots that were not part of a news article. Those sites are now run under the banner of Gannett, which merged last year with GateHouse and had already removed mug shot galleries from its sites.

Soon after, the Orlando Sentinel announced a similar change, and WRCB-TV in Chattanooga, Tenn., said it would not use booking photos unless they could help police find a person who is dangerous or wanted by authorities, help the public differentiate between people with a common name, or if the photos could encourage victims to come forward.

The decisions by those news outlets came after the Houston Chronicle announced in January that it would stop using the galleries, a move that drew praise from the local Harris County Sheriff’s Office.

“I’m hopeful that other media outlets and law enforcement agencies will follow your lead and rethink the practice of publicly shaming arrested people who haven’t been convicted of a crime,” said Sheriff’s Office spokesman Jason Spencer.

In 2018, San Francisco police began releasing booking photos of people who had been arrested on drug-related charges as a way to show the public they were dealing aggressively with crime, said Jennifer Eberhardt, a Stanford psychology professor who has studied the correlation between the public’s perception of crime and images of Black people.

But those photos disproportionately represent Black and Latino people, who make up a minority of the city’s population, she said. “If the only faces you’re seeing are of Black and Latino people, it can create this illusion that most Black and Latino people are committing the crimes,” said Eberhardt, who was among the academics with whom Scott consulted before changing his department’s mug shot policy.

“You fear the group, not the individual,” she added.