Added dynamic imagepick functionality