All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
A divorcee should not keep the photo of his/her ex-spouse since they have become non-Maharam (a person whom one can get married) to each other. If a husband divorces his wife and does not take her back before the end of the waiting period of a divorced, then she becomes a non-Maharam woman to him. So, it is not allowed for him to stay in seclusion with her, to shake hands with her or any other act that is forbidden to do with any non-Maharam woman. Therefore, he should not keep her photos, especially if it is without proper Hijab.
Moreover, taking photographs even of people whom one it is permissible to look at, is a matter of disagreement among Muslim jurists and many or them are of the opinion that it is forbidden. For more benefit, please refer to Fatwa 87765.
Allaah Knows best.