image

Adds Attachment.Image to the list of attachments.


fun image(url: String)(source)

Adds Attachment.Image with AttachmentContent.URL content from the provided URL.

Parameters

url

Image URL

Throws

if the URL is not valid or no file in the URL was found.


fun image(path: Path)(source)

Adds Attachment.Image with AttachmentContent.Binary.Bytes content from the provided local file path.

Parameters

path

Path to local image file

Throws

if the path is not valid, the file does not exist, or is not a regular file.