Imagisum
Photos byPixabay

Image API

One endpoint that turns any photo into a resizable, hotlinkable URL. No key, no signup — just point an img tag at it.

Quick start

Give the route an id and the dimensions you want. Open any photo on the site, set the size, and copy the URL from the dialog.

<img src="https://imagisum.vercel.app/image?id=p-237&width=800&height=450" width="800" height="450" alt="" />

Parameters

GET /image

ParamTypeDescription
idRequired*string`x-<id>` for a Pixabay photo, `p-<id>` (or just the number) for a Picsum one. Copy it from any photo's download dialog.
randomRequired*0 | 1A different Picsum photo on every request. Use instead of `id`.
widthOptional16–6000Output width in pixels. Alias: `w`. Pixabay photos stop at 1280.
heightOptional16–6000Output height in pixels. Alias: `h`. Pixabay photos stop at 1280.
fp-xOptional0–1Horizontal crop anchor, where 0 is the left edge. Applies when both sides are set.
fp-yOptional0–1Vertical crop anchor, where 0 is the top edge. Applies when both sides are set.
formatOptionaljpg | png | webp | avifOutput encoding. Defaults to jpg. avif is served as webp.
qOptional1–100Quality for lossy formats. Defaults to 80.
blurOptional0–100Blur, for background art and loading states.
grayscaleOptional0 | 1Strips all colour.
downloadOptional0 | 1Sends the file as an attachment so browsers save it.

* Pass either `id` or `random=1` — one of the two is required.

Sizes & cropping

Give one side and the other scales to keep the ratio. Give both and the photo is cropped to fill that exact box, centred unless fp-x / fp-y move the anchor.

/image?id=p-237&width=400                        → 400px wide, ratio preserved
/image?id=p-237&width=400&height=400             → square, centred crop
/image?id=p-237&width=1200&height=630&fp-y=0.25  → anchored nearer the top
/image?id=p-237&width=800&format=webp            → WebP

A link to a specific photo never changes, so it is cached for a year — after the first hit it is effectively free.

Random images

Drop the id for a different photo on every request — real photography instead of grey boxes.

<img src="/image?random=1&width=600&height=400" alt="" />
<img src="/image?random=1&width=1200&height=630&grayscale=1" alt="" />

Notes

  • Photos come from Pixabay and from Lorem Picsum (hand-picked Unsplash photos), free to use under the Pixabay and Unsplash licences.
  • This is a hobby project, not a CDN. Use it for prototypes, demos and mockups.
Start browsing photos