From Sahih Bukhari (Hadith 4002):
Narrated Ibn `Abbas:Abu Talha, a companion of Allah's Messenger (ﷺ) and one of those who fought at Badr together with Allah's Apostle told me that Allah's Messenger (ﷺ) said. "Angels do not enter a house in which there is a dog or a picture" He meant the images of creatures that have souls
Reference: Bukhari 4002