Your self-hosted placeholder microservice of choice.
Wildcard is similar to Unsplash It and other placeholder services. The main difference is that Wildcard was built to be the self-hosted. You decide where to run it and which images it should serve. A simple REST API provides you with an access to all images placed in images/
. Requesting specific or random placeholders in different sizes and variations (greyscaled, blurred or cropped) is just a matter of the URL.
I've used a lot of placeholder images on sites (front-ends without real content) I've built. My favorite placeholder service suddenly shut down and my front-ends started to look odd. I don't think it's necessary to depend on such a service, so I started to develop Wildcard as a self-hosted alternative.
- Place all photos you want to use as placeholders in
images/
. Wildcard supports JPEG and PNG. - Deploy your personal Wildcard on now, run it with Docker or go the manual way.
Deploy Wildcard with now installed on your system.
now
Start Wildcard with Docker installed on your system.
docker run -p 2015:3000 -v /path/to/images/:/srv/app/data/ electerious/wildcard
This command will…
- …map the internal port (
3000
) to port2015
on your system (-p
). - …allow Wildcard to use the images from your system located at
/path/to/images/
(-v
). - …use and run the newest version of Wildcard (
electerious/wildcard
).
Make sure to install and update all dependencies before you setup Wildcard.
Install all dependencies using npm
.
npm install
Start the server.
npm start
The port Wildcard is listening on.
PORT=3000