def add_image(self, image, force=False, dockerfile=None, annotations={}, autosubscribe=True):
itype = self._discover_inputimage_format(image)<EOL>if itype != '<STR_LIT>':<EOL><INDENT>return [False, "<STR_LIT>"]<EOL><DEDENT>payload = {}<EOL>if dockerfile:<EOL><INDENT>payload['<STR_LIT>'] = base64.b64encode(dockerfile.encode()).decode("<STR_LIT:utf-8>")<EOL><DEDENT>payload['<STR_LIT>'] = image<EOL>if annotations:<EOL><INDENT>payload['<STR_LIT>'] = annotations<EOL><DEDENT>url = "<STR_LIT>".format(<EOL>base_url=self.url,<EOL>autosubscribe=str(autosubscribe),<EOL>force="<STR_LIT>" if force else "<STR_LIT>")<EOL>res = requests.post(url, data=json.dumps(payload), headers=self.hdrs, verify=self.ssl_verify)<EOL>if not self._checkResponse(res):<EOL><INDENT>return [False, self.lasterr]<EOL><DEDENT>return [True, res.json()]<EOL>
**Description**
            Add an image to the scanner

        **Arguments**
            - image: Input image can be in the following formats: registry/repo:tag
            - dockerfile: The contents of the dockerfile as a str.
            - annotations: A dictionary of annotations {str: str}.
            - autosubscribe: Should active the subscription to this image?

        **Success Return Value**
            A JSON object representing the image that was added.