Praise be to Allah.
The most correct view is that it is not permissible to pray in a room in which images of animate beings are hanging, on the basis of several reports, including the following:
The hadeeth of Ibn ‘Abbaas (may Allaah be pleased with him), who said: the Prophet (peace and blessings of Allaah be upon him) said: “The angels do not enter a house in which there is a dog or images.”(Agreed upon).
The hadeeth of ‘Aa’ishah (may Allaah be pleased with her) who said: “The Messenger of Allaah (peace and blessings of Allaah be upon him) returned from a journey and I had covered an alcove with a blanket on which there were images. When the Messenger of Allaah (peace and blessings of Allaah be upon him) saw it, he tore it down and said, ‘The people who will be most severely punished on the Day of Resurrection will be those who imitate the creation of Allaah.’”(Agreed upon).
The hadeeth of Abu Hurayrah (may Allaah be pleased with him) who said: the Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Jibreel came to me and said: ‘I came to you yesterday and nothing prevented me from entering except that there was a statue by your door, and there was a curtain in your house with images on it, and there was a dog in the house. So tell someone to cut the head off the statue by your door, so it will look like a tree; tell someone to cut up the curtain and make it into floor-cushions that will be stepped on; and tell someone to put the dog outside.’” So the Messenger of Allaah (peace and blessings of Allaah be upon him) did that.(Narrated by Abu Dawood, al-Tirmidhi and Ahmad).
Shaykh al-Islam Ibn Taymiyah (may Allaah have mercy on him) gave a brief answer to this question, when he was asked: is it permissible to pray in synagogues and churches where there are images, or not? Can we say that they are the houses of Allaah, or not? He replied: they are not the houses of Allaah, for the houses of Allaah are the mosques. These (churches etc.) are houses in which people express their disbelief (kufr) in Allaah. Even though Allaah may be mentioned in them, the house is the same as its occupants, and their occupants are kuffaar, so they are the houses of worship of the kuffaar.
As regards praying in them, there are three scholarly views in the Madhhab of Ahmad and others: absolute prohibition, which is the view of Maalik; absolute permission, which is the view of some of the companions of Ahmad; and the third view, which is the correct view and was narrated from ‘Umar ibn al-Khattaab and others, and from Ahmad and others. This view states that if there are images in the church, we should not pray there, because the angels do not enter a house in which there are images, and because the Prophet (peace and blessings of Allaah be upon him) did not enter the Ka’bah until the images inside it had been wiped out. Similarly, ‘Umar said: we do not enter their churches if there are images inside.
Churches are like mosques that are built over graves. In al-Saheehayn it says that the Prophet (peace and blessings of Allaah be upon him) was told about a church in Ethiopia, and the adornments and images inside it. He said: “When a righteous man among them dies, they build a mosque (place of worship) over his grave and put those images there. They will be the most evil of people with Allaah on the Day of Resurrection.” But the Sahaabah did pray in churches in which there were no images. And Allaah knows best.