functionality to use photos from library