“Posting on the Internet is kind of like a bell you can’t unring,” Chief Whipple said at the time.

But uploading the photographs has become a common practice at some police departments from New England to California, where Facebook pages and department websites have become a popular spot for posting digital lineups.

Police officers often say their aim is transparency, not public shaming. But Ms. Foley’s case highlights a challenge for the digital age: When does public notice become public punishment in a world where digital images can live forever?

Many states consider the photographs to be public information, and those deemed newsworthy are published by the news media, sometimes in great numbers. But as the police put them on their own websites, lawyers, residents and the accused have raised concerns. They say the practice can serve as its own punishment and violate the privacy of individuals who have not been convicted of a crime.

“We have undoubtedly noticed a trend toward putting more and more prearraignment arrest and mug shot records online, and that’s a troubling trend,” said Lee Rowland, a staff lawyer with the American Civil Liberties Union. Police Facebook pages can draw attention to people who may never be convicted and whose arrests might otherwise have avoided as much public notice, she added.

“We’re uncomfortable with law enforcement using shame tactics before people receive due process in a court of law,” Ms. Rowland said. “It’s flatly inappropriate.”