Fix error on upload.
Add image upload validation.