On Facebook, the picture has attracted around 500,000 likes and nearly 40,000 comments.

The kind-hearted officer was 25-year-old Larry DePrimo, who - after spotting the barefooted man on the street - went into a nearby store and bought thermal socks and insulated boots costing $75 (£47), reports the New York Times.

"It was freezing out and you could see the blisters on the man's feet," the officer said.

Recalling the moment he gave the socks and boots to him, DePrimo commented: "He smiled from ear to ear. It was like you gave him a million dollars."

DePrimo also offered him a coffee, but wearing the new boots, the homeless man politely declined.

Jennifer Foster, who took the photo, said: "The officer expected nothing in return and did not know I was watching... I was never so impressed in my life."