K
Docs
API Reference→Pieces→Load Image from a Link
🔗

Load Image from a Link

img.from_urlThe DarkroomImages

Downloads 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.

🔗
Load Image from a Link
img.from_url
Images
urlrequired
https://… or {{options.link}}
as
image
output
error

Config fields

FieldTypeReqWhat it does
url
https://… or {{options.link}}
textyesImage link 🔗
as
image
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()));