image-size-from-base64
My website: click here
Features
- Get file image size from base64 string return to kb
Example
const getSize = require("image-size-from-base64")
let base64ImageData = `iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAY ...`
async function imageSize() {
let size = await getSize(base64ImageData)
console.log(size) // kb (Kilobyte)
}
imageSize()