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

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -