New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

connect-placeholderimg

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-placeholderimg

A connect middleware to generate placeholder images

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

#Connect Placeholder

A connect middleware to generate placeholder images

Connect Placeholder generates PNG images on the flight. Could be use as a replacement for Placehold.it.

Image generation relies on node-pureimage by Josh Marinacci.

This middleware is primarily intended as a development middleware for grunt-contrib-connect.

Note: this is a work in progress. Expect performance issues and headaches.

Install

Install via npm:

npm install connect-placeholderimg  --save-dev

Usage

In your Gruntfile.js connect task require the module inside a middleware option:

connect: {
	options: {
		middleware: function(connect, options, middlewares) {
		  middlewares.unshift(require('connect-placeholderimg')({
		  	imagePath: '/placeholder/'
		  }));
		  return middlewares;
		}
	}
	...
}

Then, assuming the default connect task configuration is in place, point images src attribute to http://localhost:8000/placeholder/WxH.

For URL format please refer to Placehold.it

Options

imagePath

Type: String Default: '/placeholder/'

The base URI for placeholder images.

Release History

  • 2014-12-31   v0.0.1   WIP release

FAQs

Package last updated on 31 Dec 2014

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc