Extract method to select image path