Keeping photos of the deceased at home
In the name of Allah, the most Beneficent, the most Merciful.
Islam only permits a person to take photos out of necessity like for ID cards or passports. Once a person passes away there is no need to have any photos of the deceased. True memories of a Muslim relative or friend reside in the heart, and then this should be manifested by praying for the deceased. Therefore, it is advised that all photos of the deceased are burnt or removed from mobile phones.
Saaidah Aisha Radiallahu Anha narrates that when the Prophet became ill, some of his wives talked about a church which they had seen in Ethiopia and it was called Mariya. Umm Salama Radiallahu Anha and Umm Habibah Radiallahu Anha had been to Ethiopia, and both of them narrated its (the Church's) beauty and the pictures it contained. The Prophet of Allah Sallallahu Alahi Wasalam raised his head and said, "Those are the people who, whenever a pious man dies amongst them, make a place of worship at his grave and then they make pictures of those people in it…" (Saih Bukhari)
The main reason for its impermissibility is that it opens the door of idol worshiping. It began with people keeping these pictures with the intention of keeping alive the memory of the deceased which, finally, led to idol worshiping. (The wisdom behind the commands of Islam p.350)
The conclusion we can come to is that it is not permissible to keep photos of the deceased after they have passed away either in picture form or on mobile phones. The best way to remember the deceased is by visiting his grave and by praying for him or her.
Only Allah Knows Best
Mohammed Tosir Miah
Darul Ifta Birmingham