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

many to many - Django Rest Framework ManyToMany filter multiple values -

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

Java Entity Manager - JSON reader was expecting a value but found 'db' -