Skip to content

Retrieving Images

These endpoints return the image itself. The response body is binary image data — save it to a file or hand it straight to a wallpaper-setting tool. Do not parse it as JSON.

MethodPathReturns
GET/api/wallpapers/random/imageA random matching wallpaper
GET/api/wallpapers/random/thumbnailA JPEG thumbnail of a random match
GET/api/wallpapers/{id}/imageA specific wallpaper by ID
GET/api/wallpapers/{id}/thumbnailA JPEG thumbnail of a specific wallpaper

All four accept filter parameters where a random selection is involved.

Full images are served with:

  • Content-Type set to the image’s own type (for example image/jpeg, image/png, image/webp).
  • Content-Disposition: inline with the original filename.
  • Cache-Control: public, max-age=3600.

Thumbnails are always served as image/jpeg at up to 300×200 pixels.

Because the endpoints stream the file directly (no redirect), curl does not need the -L flag.

Terminal window
curl "http://localhost:8519/api/wallpapers/random/image" --output wallpaper.jpg

You can also open any of these URLs directly in a browser.

If filters exclude every wallpaper, the random image endpoints respond with 404 Not Found and a plain-text body. Requesting an unknown {id} also returns 404. See Errors.