Spaceholder.cc is a free, open-source web service that generates space-themed placeholder images on demand, replacing generic gray boxes with real ESA/Hubble photographs.
What is Spaceholder.cc?
Spaceholder.cc is a web-based placeholder image generator that returns astronomical images in any dimensions you specify via a simple URL. Request an image size like /i/400x300 and the service responds with a space photo cropped or scaled to those exact pixel dimensions. It is written and maintained by Jason Garber, released under the MIT License, and the project source has moved to Codeberg.
Key Features
- URL-based API — an image URL like
https://spaceholder.cc/i/400x300directly returns the placeholder; no registration or keys needed. - Arbitrary dimensions — any numeric width and height up to 4000 pixels each, formatted as width × height (e.g., 200x50 or 1200x400).
- Square images — a single number (
/i/400) produces a square placeholder, useful for avatars and thumbnails. - Real Hubble photography — every placeholder uses images sourced from ESA/Hubble, released under Creative Commons Attribution 4.0 International.
- Open source — the entire codebase is available on Codeberg (and previously GitHub) under the MIT License, so you can inspect, fork, or self-host it.
- Zero-config deployment — the service is already live; just drop an
<img>tag into your markup and it works.
Who is it for?
- Web developers — prototype layouts and responsive designs without waiting for real client content images.
- UI/UX designers — create mockups that look polished and thematic instead of using dull gray blocks.
- Open-source contributors — study or fork a small, functional service built for the JAMstack/deployment workflow.
What can you do with it?
- Rapid prototyping: Drop a descriptive
alttext and a placeholder image likehttps://spaceholder.cc/i/400x300into any HTML page, then swap in real photos later without changing layout. - Design presentations: Use square images (
/i/240x240) to fill avatar and thumbnail slots in slide decks or client previews. - Themed projects: Since all photos are actual space imagery, placeholders complement astronomy, sci-fi, or educational content better than random gray rectangles.
How does it work?
Add the desired dimensions to the service URL, e.g., https://spaceholder.cc/i/400x300. The service returns an image from its Hubble photo library sized to those dimensions. Maximum dimension per side is 4000 pixels.
FAQ
Is Spaceholder.cc free?
Yes. The service is freely available and the source code is released under the MIT License, so you can use it, learn from it, fork it, and change it.
What is the maximum image size?
Both width and height can be no larger than 4000 pixels. The URL format must be a number, an "x", and another number.
Where do the images come from?
All placeholder photos are sourced from ESA/Hubble and are released under the Creative Commons Attribution 4.0 International license.
Can I self-host it?
The README indicates the project has moved to Codeberg and is open source under MIT, so self-hosting is possible if you run the code yourself (the linked repository contains the source).








