Added fuction to select image from the gallery