Short answer
It depends on the subject and the form. Pictures of landscapes and buildings are fine. For people and animals, the traditional Hanafi fatwa treats photos as forbidden images except for need, while many later Hanafi scholars allow digital photos kept on a screen for a valid purpose. Selfies follow the same rules, plus the rules of modesty.
Making an image of a living being is haram. The traditional Deobandi fatwa includes printed photographs, allowing them only for need such as passports and ID. Many later Hanafi scholars, Mufti Taqi Usmani among them, hold that a digital image that is not printed is not a forbidden image, so it may be used for a valid purpose with caution.
Other madhhabs
- Maliki
- A well-known Maliki view limits the clear prohibition to images with a shadow, such as statues, and holds flat images of living beings to be disliked rather than haram.
Explanation
The Prophet ﷺ warned that image-makers will receive one of the severest punishments on the Day of Judgement, and said that angels do not enter a house with a dog or images in it. These hadiths are about images of living beings. Pictures of trees, mountains, buildings, food and objects are not included.
The difference of opinion is over cameras. One group of scholars, including the traditional Deobandi muftis, said a photograph is an image like a painting, so the same prohibition applies, except for real needs. Another group said a camera only captures a reflection of what Allah created, like a mirror, and does not 'make' anything. Many later Hanafi scholars took a middle position: a printed photo of a living being is an image, while a digital file shown on a screen is closer to a reflection, so it can be used for a valid purpose.
What this means in practice:
- Passport, ID, driving licence, school and work photos, medical images and security cameras are allowed by everyone because of need.
- Displaying framed photos of people or animals on your walls should be avoided under every Hanafi view.
- Family photos kept on your phone are permitted under the digital view, and best kept to a minimum under the stricter one.
Selfies raise further questions beyond the image itself: showing off, wasting time, and posting pictures that break the rules of modesty. A woman posting her photos publicly invites attention that the rules of hijab are meant to prevent. If you follow the more lenient view, keep pictures modest, purposeful and private.
The evidence
Sahih al-Bukhari 5950
Sahih... إن أشد الناس عذابا عند الله يوم القيامة المصورون ...
"The people with the severest punishment from Allah on the Day of Resurrection are the image-makers."
Making images of living beings is a grave sin.
Sahih al-Bukhari 5949
Sahih... لا تدخل الملائكة بيتا فيه كلب ولا تصاوير ...
"Angels do not enter a house in which there is a dog or images."
Displaying images of living beings in the home is to be avoided.
Where the ruling is recorded
- Tasvir ke Shar'i Ahkam (Mufti Muhammad Shafi), Treatise on the rulings of images. The traditional Deobandi case that photographs are images in the Shariah sense.
- Takmilat Fath al-Mulhim (Mufti Taqi Usmani), Kitab al-Libas wa al-Zina, discussion of images and photography. Sets out the views on photography and the case for treating digital images differently.
- Radd al-Muhtar (Ibn Abidin), Kitab al-Salah, chapter on what is disliked in prayer. Discusses images of living beings, which are permitted and which are not.
This answer is pending review by the scholars on our team. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.