1.0.1 • Published 7 years ago
await-image-size v1.0.1
await-image-size.js
Resolves when an image's size becomes available.
Dimensions typically become available long before the load completes, allowing you to position and scale the image before it finishes loading.
Home |
npm install await-image-size
API
awaitImageSize(image)
Returns a Promise
that resolves with HTMLImageElement
image
once its dimensions have loaded.