Imgur image upload

npm install imsave
5 downloads in the last day
8 downloads in the last week
10 downloads in the last month


Imgur image upload for node.js and the browser (via browserify).

Build Status Dependency Status NPM version


To install, use:

npm install imsave

You must then also acquire a ClientID from

Sever Usage

var imgur = require('imsave')('ClientID')

imgur(fs.readFileSync('image.jpeg'), function (err, url) {
  if (err) throw err
  console.log('URL for image: ' + url)


imgur(fs.createReadStream('image.jpeg'), function (err, url) {
  if (err) throw err
  console.log('URL for image: ' + url)

Client Usage

Using Browserify

<input id="pictureIn" type="file" />
<img id="pictureOut"/>
<button id="submit">Upload</button>
var imgur = require('imsave')('ClientID')

var submit = document.getElementById('submit')
var input = document.getElementById('pictureIn')
var output = document.getElementById('pictureOut')

submit.addEventListener('click', function () {
  imgur(input.files[0], function (err, res) {
    if (err) throw err //handle error here
    output.src = res
}, false)


If the callback is omitted, a Promises/A+ promise is returned. This is very useful for composing multiple asynchronous operations, especially if they are in parallel.



npm loves you