Instalation
npm install image-size
Usage
var sizeOf = ;var dimensions = ;console;
Async version
var sizeOf = ;;
Using a url
var url = ;var http = ; var sizeOf = ; var imgUrl = 'http://my-amazing-website.com/image.jpeg';var options = url; http;
You can optionally check the buffer lengths & stop downloading the image after a few kilobytes. You don't need to download the entire image
Supported formats
- BMP
- GIF
- JPEG
- PNG
- PSD
- TIFF
- WebP
- SVG
Upcoming
- SWF
Credits
not a direct port, but an attempt to have something like dabble's imagesize as a node module.