Random SVG blob images you can embed with a single URL.
Requires Go 1.25 or later.
go run .The server listens on http://localhost:3000. Set PORT to use another port.
PORT=8080 go run .Build and run a container:
docker build -t blobcdn .
docker run --rm -p 3000:3000 blobcdnYou can also run the published image:
docker run --rm -p 3000:3000 ghcr.io/upsetdev/blobcdn:latestReturns an SVG blob. All query parameters are optional.
| Parameter | Default | Description |
|---|---|---|
seed |
random | Reproduce a specific blob. Any string. |
extraPoints |
4 |
Extra points on top of the base three. |
randomness |
6 |
How far points move from the center. |
size |
256 |
SVG width and height in pixels. |
fill |
random color | Hex color without #. |
stroke |
none |
Hex color without #. |
strokeWidth |
0 |
Stroke width in pixels. |
curl 'http://localhost:3000/blob.svg?seed=hello&size=128&fill=ff0000'The Blob-Path response header holds a URL that reproduces that blob. Blob-Version is 1.0-dev, or <hostname>-<POP_ID> when POP_ID is set.
HEAD works the same way. Other methods return 405, and unknown paths return 404.
| Example | URL |
|---|---|
https://blobcdn.com/blob.svg?seed=hello |
|
https://blobcdn.com/blob.svg?seed=blobcdn&fill=ff4d6d&extraPoints=6 |
|
https://blobcdn.com/blob.svg?seed=42&fill=ffd166&stroke=333333&strokeWidth=4 |
Run the tests:
go test ./...Tests cover blob generation, SVG output, query parsing, and HTTP headers using recorded fixtures in testdata/golden.
Source layout:
main.go: entry point,PORTandPOP_IDconfiguration.internal/server: routes, headers, and response handling.internal/blobs: seeded blob generation and SVG rendering.internal/js: number and query string behavior.internal/libm: math helpers used by blob generation.