I would ask both the cemetery and the family for permission. Find
Find a Grave posted pictures of my family members, in particular a brother and sister, and when my mom discovered this, it brought up a lot of grief and sadness and the painful reminder that they are not with us. The photographer then gave us a lot of attitude and was rude in regards to our wishes to take the photos of the children down. As
As far as I know it is legal because it is open to the public, but out of courtesy, I would ask both the cemetery management, and families, if possible.