async def METHOD_NAME(self, options: scrypted_sdk.ImageOptions = None) -> Any:
    if options and options.get('format', None):
        raise Exception('format can only be used with toBuffer')
    newVipsImage = await self.toImageInternal(options)
    return await createImageMediaObject(newVipsImage)