Added a validator to fix the image upload problem