Sharp: Batch processing? Globs?

Created on 30 Apr 2018  路  2Comments  路  Source: lovell/sharp

Can someone point me to an example that processes an image folder instead of a single image? Thanks.

question

Most helpful comment

Hello, perhaps use the glob module to build a list of files.

glob("*.jpg", (err, files) => {
  for (const file of files) {
    sharp(file)...
  }
});

All 2 comments

Hello, perhaps use the glob module to build a list of files.

glob("*.jpg", (err, files) => {
  for (const file of files) {
    sharp(file)...
  }
});

Hope this answered your question.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Andresmag picture Andresmag  路  3Comments

kachurovskiy picture kachurovskiy  路  3Comments

henbenla picture henbenla  路  3Comments

vermin1337 picture vermin1337  路  3Comments

tomercagan picture tomercagan  路  3Comments