url-image-size
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

url-image-size

Supports all the image formats supported by image-size:

  • BMP
  • CUR
  • GIF
  • ICO
  • JPEG
  • PNG
  • PSD
  • TIFF
  • WebP
  • SVG
  • DDS

How to use

npm install url-image-size

or

yarn add image-size

Asynchronous

import getImageSize from 'url-image-size';
const imageSize = await getImageSize('https://nodejs.org/static/legacy/images/logo.png');
console.log(imageSize);

Result:

{ height: 66, width: 245, type: 'png'}

Package Sidebar

Install

npm i url-image-size

Weekly Downloads

182

Version

0.2.0

License

MIT

Unpacked Size

4.04 kB

Total Files

4

Last publish

Collaborators

  • junehay