UNPKG

url-image-size

Version:

Get URL(ex. s3, cloudfront...) image size

42 lines (31 loc) 538 B
# url-image-size ## Supports all the image formats supported by [image-size](https://github.com/image-size/image-size): - BMP - CUR - GIF - ICO - JPEG - PNG - PSD - TIFF - WebP - SVG - DDS ## How to use ```shell npm install url-image-size ``` or ```shell yarn add image-size ``` ### Asynchronous ```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'} ```