Homeless man sleeping on the street in New York City. (Photo: SBA via Flicker)

Homeless man sleeping on the street in New York City. (Photo: SBA via Flicker)

NYPD officers fed up with vagrants making life miserable in the city are taking matters into their own hands — by snapping photos of quality-of-life scofflaws and posting them online.

The Sergeants Benevolent Association is spearheading the effort, emailing a letter to members Monday urging them and their families and friends to take pictures to document the decline of A homeless man pictured walking the New York City streets.

“As you travel about the city of New York, please utilize your smartphones to photograph the homeless lying in our streets, aggressive panhandlers, people urinating in public or engaging in open-air drug activity, and quality-of-life offenses of every type,” says the letter from SBA President Ed Mullins, a major critic of Mayor Bill de Blasio.

The union then “will notify our public officials in writing of what is being observed,” he said.

The first set of snapshots uploaded to the SBA’s account on the photo-sharing site Flickr shows a raggedy panhandler approaching cars stopped at a red light, someone sleeping on pizza boxes outside a park and several people slumped on sidewalks with cups and signs begging for handouts.

Similar shots have recently appeared in The Post — including a Page 1 photo of a man relieving himself on an Upper West Side street — as complaints have surged about vagrants camping out on sidewalks and taking over parks.

Mullins told the New York Post he was responding to the past two years of “failed policies, more homeless encampments on city streets, a 10 percent increase in homicides, and the diminishing of our hard-earned and well-deserved public perception of the safest large city in America.”