Remove unnecessary code from image uploader