Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

browser-image-size

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-image-size

Get image size in the browser

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3K
decreased by-7.07%
Maintainers
1
Weekly downloads
 
Created
Source

Browser image size

NPM version build status

Sauce Test Status

Installation

$ npm install browser-image-size

To use browser-image-size you must polyfill Promise.

Usage

var browserImageSize = require('browser-image-size')

browserImageSize('128.png')
.then(function (size) {
  console.log(size)
  // => {height: 128, width: 128}
})

API

browserImageSize(image)

Parameters:

  • image : {(File|blob|string)} File, blob, or URL string

Returns:

  • BrowserImageSizePromise : {Promise} resolved with object containing image width and height

Tests

$ npm test -- --local

License

MIT

Keywords

FAQs

Package last updated on 14 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc