Skip to content

jo/http-image-size

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http-image-size

NPM version Build Status Dependency Status devDependency Status

Detect image dimensions via http or https.
It does so by trying to extract image size via image-size on each chunk received. When the dimensions are present, the request is aborted.

Usage

var size = require('http-image-size');

size('http://die-tf.de/fuck-yeah/fuck-yeah.jpg', function(err, dimensions, length) {
  console.log(err, dimensions, length);
});

The callback receives three arguments: err, dimensions, length:

dimensions is in the form { height: 1063, width: 1600 }.
length is the number of bytes loaded.

License

Copyright (c) 2014 Johannes J. Schmidt
Licensed under the MIT license.

About

Detect image dimensions over http.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published