Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Node.JS module for detecting image dimensions
JavaScript

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
lib
specs
.gitignore
.jshintrc
.npmignore
.travis.yml
Contributors.md
LICENSE
Makefile
Readme.md
package.json

Readme.md

Build Status Dependency Status Technical debt analysis

Instalation

npm install image-size

Usage

var sizeOf = require('image-size');
var dimensions = sizeOf('images/funny-cats.png');
console.log(dimensions.width, dimensions.height);
Async version
var sizeOf = require('image-size');
sizeOf('images/funny-cats.png', function (err, dimensions) {
  console.log(dimensions.width, dimensions.height);
});

Supported formats

  • BMP
  • GIF
  • JPEG
  • PNG
  • PSD
  • TIFF
Upcoming
  • WebP
  • SVG
  • SWF
Credits

not a direct port, but an attempt to have something like dabble's imagesize as a node module.

Contributors
Something went wrong with that request. Please try again.