javascript - how to pass a buffer to imagemin module in node.js? -


in older version of imagemin able pass module buffer so:

new imageminify()     .src(streamorbuffer)     .use(imageminify.jpegtran({progressive: true})) 

in current version of imagemin there no src function , calling module result in promise.

i not find how achieve same result in newer version of imagemin

could done or support removed?

i got answer github repo. i'm posting answer here in case else encounter same problem:

you can supply buffer using imagemin.buffer. streams has never been supported.


Comments