add addphoto function to management script