make image-saving something that can be done outside package