Keeping pictures of living people is an issue of dispute among great scholars. The majority forbid it.
With dead people, they all agree that this is not permissible as it may lead to shirk or talking to the deceased as it happened with the people of Noah, peace be upon him.