added function that returns selected image url