added back functionality to user photos and admin photos