Get URL(ex. s3, cloudfront...) image size
npm install url-image-size- BMP
- CUR
- GIF
- ICO
- JPEG
- PNG
- PSD
- TIFF
- WebP
- SVG
- DDS
``shell`
npm install url-image-size
or
`shell`
yarn add image-size
`javascript`
import getImageSize from 'url-image-size';
const imageSize = await getImageSize('https://nodejs.org/static/legacy/images/logo.png');
console.log(imageSize);
Result:
`js``
{ height: 66, width: 245, type: 'png'}