Skip to content

Commit

Permalink
Concise node image resize logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ivynya committed Jan 17, 2022
1 parent 02fff2d commit dbe9dc1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion services/image/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ const args = yargs(process.argv.slice(2))
.argv;

if (args.file && args.output) {
console.log(`Resizing ${args.file} | ${args.output}`);
const inputFSplit = args.file.split('/');
const inputFileName = inputFSplit[inputFSplit.length - 1];
console.log(`Resizing ${inputFileName}`);
sharp(fs.readFileSync(args.file))
.rotate()
.resize({ fit: 'contain', width: 600 })
Expand Down

0 comments on commit dbe9dc1

Please sign in to comment.