Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

get-image

2.0.0 • Public • Published

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

Keywords

install

npm i get-image

Downloadsweekly downloads

492

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability