image-size

Node module for detecting image dimensions

View the Project on GitHub netroy/image-size

Coverage

Dependency Status Build Status Technical debt analysis

NPM version Endorse

Instalation

npm install image-size

Usage

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

Supported formats

Upcoming
Credits

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