0.2.0 • Published 3 years ago
url-image-size v0.2.0
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'}