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

Optional

string

A text description of the image for accessibility.

buffer

Optional

Buffer

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

size

Optional

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

The size of the image to render within the action. Size sets the maximum width and automatic height based on the source image. Can be "thumbnail" (64px), "small" (128px), "medium" (256px), or "large" (512px).

url

Optional

string

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

Returns

null

Was this section useful?
On this page