Self-hosted image placeholder server
Sometimes you need a placeholder server with your own stock or corporate images. Punk allows you to throw a bunch of images inside a folder and run the server
Make sure you have
imagemagick installed in your OS then:
npm i -g corporate-punk
To run the server you can provide your own directories from where to pull the images.
|--images||Path to images folder||
|--cache||Path to processed images cache folder||
|--port||Port to listen on||
|resize||Resizes the final image by given width and height||
|crop||Crops the final image by given width and height||
|quality||Sets the image quality: [1-100]||
|image||Select an specific image, if not present, a random image will be returned||
Clearing the cache
Sometimes you might want to clear the cache for different reasons, in that case just go to the UI and hit the Clear cache button. Note this action is publicly available so far, probably in the future will be password protected.
This app is just passing query parameters directly to an
imagemagick wrapper, without any kind of sanity check, bad shit can happen.
Sanitize query strings