The second category is fixed or still pictures on paper (photographs) …
But the matter needs further discussion if one wants to make these kind of permissible pictures.
For they are subject to five rulings which depend on the intention. If the intention is something forbidden, then it is haraam. If he intends something waajib (obligatory), then it is waajib. Sometimes pictures may be essential, especially moving pictures. For example, if we see someone in the act of committing a crime against a person’s rights, such as an attempt to kill and so on, and we cannot prove it in any way but by taking pictures, then in this case taking pictures becomes waajib, especially in cases where pictures may decide the case. The means are subject to the rulings on the ends. If we make these pictures in order to prove the identity of a person for fear that someone else may be accused of the crime, this is also acceptable, indeed it is essential.
But if we take these pictures just to enjoy looking at them, this is undoubtedly haraam… And Allaah knows best.”
(See Al-Sharh al-Mumti’, 2/197-199)