The officials stated that the people were being identified as part of an initiative to “expose uncivilised behaviours and improve citizens’ quality”.
The online images, which were caught by surveillance cameras, included information such as the person’s name and ID card number.
Officials argued that residents were banned from wearing pyjamas in public because the region was entering a national “civilised city” competition.
Other “bad behaviour” exposed by the local government online included “lying [on a bench] in an uncivilised manner” and handing out advertising flyers.
Following media attention and criticism online, the message was deleted and the Suzhou authorities issued a public apology.
“We wanted to put an end to uncivilised behaviour, but of course we should protect residents' privacy,” officials said in a statement, according to the BBC.
The officials added that they would, in future, blur people’s faces out of the images instead.
Last year, it was revealed that researchers in China had developed an ultra-powerful camera capable of identifying a single person among stadium crowds of tens of thousands of people.
The 500-megapixel camera was developed by scientists at Fudan University, in conjunction with Changchun Institute of Optics from the Chinese Academy of Sciences.
The resolution of the camera is said to be five-times more detailed than the human eye and was built for surveillance purposes, with Chinese state media praising the camera’s “military, national defence and public security applications”.