All perfect praise be to Allah, The Lord of The Worlds, and may His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
It goes without saying that traffic accidents are most painful to the victims and their families since death is the worst of afflictions. Allah, The Almighty, Said (What means): "and the affliction of death befalls you" {Al-Mai`dah/106}.
Accordingly, Prophet Mohammad (PBUH) said: "The similitude of believers in regard to mutual love, affection, fellow-feeling is that of one body; when any limb of it aches, the whole body aches, because of sleeplessness and fever." {Muslim}. This Hadith indicates that a Muslim should do his best to save victims and help them as much as he could, and not to violate their sanctity, whether they are dead or alive, through taking pictures and sharing them via social media. Such act is forbidden because it violates the sanctity of others while Islam has preserved it. Allah, The Almighty, says in this regard: "We have honored the sons of Adam" {Al-Isra`/70}. Another reason is that the afore act involves spying on others, and Allah, The Almighty, Says (What means): "spy not on each other" {Al-Hujurat/12}. Not only that, but Islam forbids taking pictures of others, while going about their daily life, without seeking their permission.
Any person who witnesses an accident where there are dead victims should cover them since A’ishah (RAA) narrated ‘When the Messenger of Allah (PBUH) died, he was covered with a Yemeni mantle that had some designs on it." { Agreed upon}. And Allah knows best.