From 5a0fabd6542d84b6136684f462e9a6ce33cd382b Mon Sep 17 00:00:00 2001 From: Teoh Han Hui Date: Wed, 15 Jun 2016 11:40:14 +0800 Subject: [PATCH] Fix NaN time in optimize log when output format is different from input --- src/streams/optimize.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/streams/optimize.js b/src/streams/optimize.js index cd5cacf..4d8f7c3 100644 --- a/src/streams/optimize.js +++ b/src/streams/optimize.js @@ -20,7 +20,7 @@ module.exports = function () { return callback(null, image); } - image.log.time('optimize-sharp:' + image.format); + image.log.time('optimize-sharp:' + (image.outputFormat || image.format)); var r = sharp(image.contents);