Socket
Socket
Sign inDemoInstall

corporate-punk

Package Overview
Dependencies
100
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    corporate-punk

Self-hosted image placeholder server


Version published
Weekly downloads
7
increased by600%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

corporate punk

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

Installation

Make sure you have imagemagick installed in your OS then:

npm i -g corporate-punk

Usage

To run the server you can provide your own directories from where to pull the images.

Server parameters
parameterdescriptionexample
--imagesPath to images folderpunk --images='/path/to/images'
--cachePath to processed images cache folderpunk --cache='/path/to/cache'
--portPort to listen onpunk --port=3000
URL parameters
parameterdescriptionexample
resizeResizes the final image by given width and height/hold?resize=400x400
cropCrops the final image by given width and height/hold?crop=200x250
qualitySets the image quality: [1-100]/hold?quality=25
imageSelect an specific image, if not present, a random image will be returned/hold?image=calaveras.jpg
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.

Disclaimer

This app is just passing query parameters directly to an imagemagick wrapper, without any kind of sanity check, bad shit can happen.

Todo

Sanitize query strings

Keywords

FAQs

Last updated on 09 Nov 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc