YANBU to not wish to see this. YABU if you expect people not to freely post what they want to on their FB page.
You can hide it. You cannot un-see it of course, but being a grown up you need to move on quickly from it and 'hide' it.
I think with things like this, you have to take a step back from yourself and think "Didn't need to see that" (and move on), it's upsetting, but FUCK, I wouldn't want to be in that position where my way of grieving is to want people to know what I lost, and my only picture of my beloved child was one that was of a child dead.
You cannot unsee many things in the course of a life, I cannot un-see my MIL in the chapel of rest with the totally wrong make up on and a wonky shoe, I cannot un-see the little boy who'd just been run over, I am very VERY grateful that I do not have to see my baby dead. BUT the picture is of a child, who is as loved as any living child, who's parent is grieving, who, if a FB poster feels they HAVE to post their pictures of their loved ones because that's what FB is all about.
It's distressing, upsetting and sometimes 'unpleasant' and YANBU to feel affected by it, however, your friends ANBU to post freely, to use FB as a tool for sharing, happiness or pain... I guess to 'deal' with it, you either delete anyone who may share something that might upset you or, you could learn to cry for them, give thanks it's not you, accept that in our social lives certain things crop up that may 'kill your mood' but that is life. FB isn't fiction, it's real life. It's also a private life shared. I think a lot of us need to develop strategies that enable us to 'cope' with this real sharing. We need to be gentle with it, we don't need to 'agree' with other's sharing decisions, but acknowledge that it's their right to do whatever they wish.
I cannot say YABU, even though I think y'know, you are... YABU to moan about it, but YANBU to feel how you feel about it, YABY to think people should consider your feelings amid such searing pain, YANBU for it to upset you.