support specifying an imageChooser function