(CNN) A city in Ohio says it decided to release a set of graphic photos to drive home the devastating effects of heroin addiction and the toll it takes on families.

The photos show a man and woman passed out in the front seat of a car with a child sitting in the back.

"We feel it necessary to show the other side of this horrible drug," a post on the city of East Liverpool's Facebook page reads, explaining its decision

"We feel we need to be a voice for the children caught up in this horrible mess."

The traffic stop

The photographs, which the city government posted with a graphic warning, come from a traffic stop Wednesday by city police.

East Liverpool police Officer Kevin Thompson approached the driver, James Acord, who was weaving erratically between lanes, noticing the man's head "bobbing back and forth his speech was almost unintelligible," according to an affidavit.

Thompson said Acord was trying to tell him that he was taking the passenger passed out in the front seat, Rhonda Pasek, to a hospital. But immediately afterward, the driver lost consciousness -- and Thompson saw a little boy in the back of the car.

The city of East Liverpool, Ohio, said it's trying to warn the public about the dangers of heroin.

"This child can't speak for himself but we are hopeful his story can convince another user to think twice about injecting this poison while having a child in their custody," the Facebook post reads.

The effects of overdose

The boy turned out to be Pasek's 4-year-old grandson, according to Dane Walton, administrator for the Columbiana County Juvenile Court. Earlier, police had said he was her son.

The officer noticed she was starting to turn blue. He called emergency medical technicians, who administered Narcan, an opiate reversal agent that can save the life of someone acutely overdosing.

According to court documents, Acord pleaded no contest to operating a vehicle while impaired and endangering a child. He was sentenced Thursday to 360 days in jail, had his driver's license suspended for three years and was fined $475.

Pasek pleaded not guilty Thursday to endangering a child, disorderly conduct and public intoxication. She is scheduled to appear for a pretrial hearing next week in East Liverpool Municipal Court. Her bond was set at $150,000, CNN affiliate WTOV-TV in Steubenville, Ohio, reported

The photographs

"We are well aware that some may be offended by these images and for that we are truly sorry, but it is time that the non drug using public sees what we are now dealing with on a daily basis," the city government said on Facebook.

"The poison known as heroin has taken a strong grip on many communities not just ours, the difference is we are willing to fight this problem until it's gone and if that means we offend a few people along the way we are prepared to deal with that."