A man came to Ibn Abbas and said, "Abu Abbas, I am a man who paints these images and crafts these figures, so give me a ruling concerning them."Ibn Abbas replied, "Come closer to me." The man drew near until Ibn Abbas placed his hand on his head and said, "I will inform you of what I heard from the Messenger of Allah ﷺ. He said, 'Every image-maker is in the Fire. For every image he made, a soul will be assigned to it that will torment him in Hell.' So if you must do it, then make trees and things that have no soul."
حدثنا عبد الأعلى بن عبد الأعلى عن يحيى يعني ابن أبي إسحاق
جاء رجل إلى ابن عباس فقال يا أبا العباس إني رجل أصور هذه الصور وأصنع هذه الصور فأفتني فيها قال ادن مني فدنا منه حتى وضع يده على رأسه قال أنبئك بما سمعت من رسول الله ﷺ يقول كل مصور في النار يجعل له بكل صورة صورها نفس تعذبه في جهنم فإن كنت لا بد فاعلا فاجعل الشجر وما لا نفس له
Its isnad is sahih. Saeed bin Abu Hasan is the brother of Hasan Basri, their father being Abu Hasan, whose name was Yasar. Saeed is a trustworthy tabii, and Bukhari included his biography in al-Kabir 2/1/423. The hadith was narrated by Bukhari 4:345 through Awf from Saeed, and this is the only hadith from this Saeed found in Bukhari, as Hafiz stated in Tahdheeb. See also 2162.