Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nodejs sharp get image size

const image = await sharp(file.buffer)
const metadata = await image.metadata()
console.log(metadata.width, metadata.height)
 
PREVIOUS NEXT
Tagged: #nodejs #sharp #image #size
ADD COMMENT
Topic
Name
6+5 =