refactored cropper to decouple upload button