Skip to content

io.display.image ​

Represents a display.image component.

Usage ​

ts
await io.display.image("An animated gif", {
  url: "https://media.tenor.com/dutdoOw7PjsAAAAj/happy-cat.gif",
})
python
await io.display.image("An animated gif",
  url = "https://media.tenor.com/dutdoOw7PjsAAAAj/happy-cat.gif",
)

example of Forge app with display.image component

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 ​