From al-Malfūz al-Sharīf, pp. 280:
Can one take photographs of the Awliya and pious individuals and keep them for the sake of barakah?
The photos Sayyidunā Khalīlullāh álayhis salâm, Sayyidunā Ismayil Zabīhullāh álayhis salâm and Sayyidāh Bībī Maryam rađiyAllāhu ánha were painted inside the blessed Ka’abah. They were regarded as sacred, but Sayyidunā RasūlAllâh śallAllāhu álayhi wa âlihi wa sahbihī wa sallam personally erased them with his śallAllāhu álayhi wa âlihi wa sahbihī wa sallam blessed hands.