It is narrated from Sayyiduna Ali (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) went out with a funeral and said: "Is there a man who will go to Madinah and not leave any (raised) grave without levelling it, any image without effacing it, or any idol without breaking it?" Upon this a man stood up, but he was afraid of (the reaction of) the people of Madinah. Then Sayyiduna Ali (may Allah be pleased with him) stood up and said: "O Messenger of Allah (peace and blessings be upon him), I (will carry out this task)." So he went, and then came back and said: "O Messenger of Allah (peace and blessings be upon him), I did not come back to you until I had levelled every (raised) grave there with the ground, defaced every image and smashed every idol." Upon this he (peace and blessings be upon him) said: "Whoever takes up the making of any of these things again has disbelieved in what has been sent down upon Muhammad (peace and blessings be upon him). Never be one who puts people to trial, nor arrogant, nor a trader (greedy only for wealth), except a trader in good, for these are the ones who are foremost in (righteous) deeds."
Hadith Referenceمسند أبي يعلى الموصلي / مسند علي بن أبي طالب رضي الله عنه / 506
Hadith Takhrij«قال سعيد بن محمد السناري: ضعيف: بهذا التمام» «أخرجه مسند أحمد برقم: 659، وأخرجه مجمع الزوائد ومنبع الفوائد برقم: 8886، مسند ابویعلیٰ ترقیم الاثری: 501»