io.display.image
Displays an image to the action user. One of url
or buffer
must be provided.
Usage
- TypeScript
- JavaScript
- Python
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",
});
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",
});
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
- TypeScript
- JavaScript
- Python
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
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
alt
Optional
str
A text description of the image for accessibility.
bytes
Optional
bytes
Bytes of the image file. Pass this or "url" to specify the image. Maximum size is 50MB.
size
Optional
Literal["thumbnail", "smail", "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
str
The url for the image. Pass this or `bytes` to specify the image.
Returns
None
Did this section clearly explain what you wanted to learn?