Reference: Fataawa al-Lajnah ad-Daa.imah lil-Buhooth al-‘Ilmiyyah wal-Iftaa., – Volume 1, Page 711, Question 3 of Fatwa No.4126
Question: A Muslim man owns a camera, and [now] Allaah has guided him to knowing the truth regarding taking pictures. So is there any sin upon him if he was to was to rid himself of it by selling it since it is still new, and also, he is in need of the money?
Response: Taking pictures of [all] that which has a soul [from amongst the humans and animals] is absolutely haraam, unless there arises a [genuine] need such as a photograph for the passport for example. So selling the camera to whoever will use it in taking haraam pictures is [in itself] haraam. And selling it to whoever will use it in taking photographs of [all] that which has a soul [from amongst the humans and animals] or other than that, where a [genuine] need has arisen is permissible.
And with Allaah lies all success and may Allaah send prayers and salutations upon our Prophet ﷺ and his family and his companions.