🔗
Load Image from a Link
img.from_urlThe DarkroomImagesDownloads a PNG, JPEG, GIF or WebP from any https link — handy for APIs that return image URLs. Links to private networks are blocked, and files over 10 MB are refused.
When to use this
- →The link must point at the image itself, not a web page that shows it
On the canvas
This is what Load Image from a Link looks like when you place it on your flow. Each field below is something you configure in the inspector panel.
🔗Images
Load Image from a Link
img.from_urlurlrequired
https://… or {{options.link}}
as
image
output
error
Config fields
| Field | Type | Req | What it does |
|---|---|---|---|
urlhttps://… or {{options.link}} | text | yes | Image link 🔗 |
asimage | text | — | Save it as ✨ |
Output ports
outputThe image is in your spark
errorNot an image, too big, too slow, or blocked
📐
In TypeScript, this would be…
Not something you need to write — just a look at what Kitcord does for you.
TypeScript
const res = await fetch(url, { redirect: "manual", signal: AbortSignal.timeout(8_000) });
// Kitcord also blocks private-network hosts, caps the size at 10 MB,
// and checks the bytes really are an image before using them
const image = await loadImage(Buffer.from(await res.arrayBuffer()));Related pieces
More Images pieces