Created
August 29, 2018 16:09
-
-
Save Meandmybadself/88ac323680d64f359f10666c02baeb11 to your computer and use it in GitHub Desktop.
Provides resolution for all images in a given directory.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sizeOf = require('image-size') | |
const glob = require('glob') | |
glob('*.*', {nodir: true, cwd: './i/'}, (err, files) => { | |
files.forEach(f => { | |
const dims = sizeOf(`./i/${f}`) | |
console.log(`${f}\t${dims.width}\t${dims.height}`) | |
}) | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment