Stubimage

URL reference

Every image is described entirely by its URL, so you can put it straight into an <img> tag, a Markdown file or a design tool. There is nothing to sign up for.

Placeholders

GET/{width}x{height}[.svg|.png]
ParameterDescription
bg, fgBackground and text color, hex without # or a named color.
textUp to 60 characters. Defaults to the size. Empty string for no text.

/640x360, /300 for a square, /1200x630.png?bg=e2e8f0 for a solid PNG. SVG sizes go up to 4000 px, PNG up to 2000 px. PNG output has no text.

Avatars

GET/avatar/{seed}.svg?style=pixel&size=96

The same seed always gives the same image, so you can use a user ID or email hash. Styles: rings, pixel, initials, shapes. shape=circle rounds the image; name= sets the text for initials.

Badges

GET/badge/{label}-{message}-{color}.svg

Compatible with the common static badge syntax. Use -- for a dash, __ for an underscore and _ or %20 for a space. Leave the label out for a single-part badge: /badge/stable-blue.svg. Options: style=flat-square, labelColor.

![build](https://assets.rooni.dev/badge/build-passing-brightgreen.svg)

Colors

Hex colors (3 or 6 digits) and these names: brightgreen, green, yellowgreen, yellow, orange, red, blue, grey, lightgrey, success, important, critical, informational, inactive. The list is also available at GET /api/v1/colors.

Caching

Placeholders and avatars are immutable and cached for 30 days, badges for an hour. All responses carry an ETag. Images are generated on the fly; nothing is stored on our side.