I was sitting with Ibn Abbas when a man from Iraq came to him and said, "I make these images. What do you say about them?"Ibn Abbas replied, "Come closer, come closer. I heard Muhammad ﷺ say, 'Whoever makes an image in this world will be charged on the Day of Resurrection with breathing the spirit into it, and he will not be able to do so.'"
أخبرنا عمرو بن علي قال حدثنا خالد وهو ابن الحارث قال حدثنا سعيد بن أبي عروبة
كنت جالسا عند ابن عباس أتاه رجل من أهل العراق فقال إني أصور هذه التصاوير فما تقول فيها فقال ادنه ادنه سمعت محمدا ﷺ يقول من صور صورة في الدنيا كلف يوم القيامة أن ينفخ فيها الروح وليس بنافخه
Bukhari transmitted it in the Book of Dress, chapter "Whoever makes an image will be required on the Day of Resurrection...," Hadith 5963, and Muslim in the Book of Dress, chapter "The prohibition of depicting the image of a living creature...," Hadith 100/2110, from the hadith of Ibn Abu Aruba with the same chain.