Skip to main content

io.display.image

Displays an image to the action user. One of url or buffer must be provided.

Usage

await io.display.image('An animated gif', {
url: 'https://media.giphy.com/media/26ybw6AltpBRmyS76/giphy.gif',
alt: "Man makes like he's going to jump on a skateboard but doesn't",
size: 'medium',
})
interval.com

Props

alt

string Optional

A text description of the image for accessibility.

buffer

Buffer Optional

A Node.js Buffer of the image file. Pass this or "url" to specify the image. Maximum size is 50MB.

height

"thumbnail" | "small" | "medium" | "large" Optional

The height of the image to render within the action. Can be "thumbnail" (64px), "small" (128px), "medium" (256px), or "large" (512px).

size

"thumbnail" | "small" | "medium" | "large" Optional

The size of the image to render within the action. Size sets both height and width and takes precedence over those props. Can be "thumbnail" (64px), "small" (128px), "medium" (256px), or "large" (512px).

url

string Optional

The url for the image. Pass this or "buffer" to specify the image.

width

"thumbnail" | "small" | "medium" | "large" Optional

The width of the image to render within the action. Can be "thumbnail" (64px), "small" (128px), "medium" (256px), or "large" (512px).

Returns

null

Was this section useful?
On this page