JSPM

image-dimensions

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 90887
  • Score
    100M100P100Q157715F
  • License MIT

Get the dimensions of a file input

Package Exports

  • image-dimensions

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (image-dimensions) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

image-dimensions

NPM version Build status Test coverage Dependency Status License Downloads Gittip

Get the dimensions of an image blob.

import getDimensions from 'image-dimensions'

const file = document.query('input[type="file"]')

getDimensions(file).then(function (size) {
  console.log(size.width)
  console.log(size.height)
})