url-image-size
v0.2.0
Published
Get URL(ex. s3, cloudfront...) image size
Downloads
412
Readme
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'}