2.0.0 • Published 7 years ago

get-image v2.0.0

Weekly downloads
965
License
MIT
Repository
github
Last release
7 years ago

get-image

get-image is a simple module that creates a preloaded <img> for a given src.

Build status

Browser support

Install

$ npm install get-image

note: canvas is not installed alongside get-image

get-image requires automattic/node-canvas for its server/node variant, however, to avoid browser-only users from having to endure the native compilation process, it needs to be npm installed separately.

Usage

Browser & Server

var image = require('get-image')

image('./image.jpg', function(error, img) {
  document.body.appendChild(img)
})

License

MIT

2.0.0

7 years ago

1.0.1

8 years ago

1.0.0

9 years ago