Validate uploading an image