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

janaz picture janaz  路  3Comments

kachurovskiy picture kachurovskiy  路  3Comments

jaydenseric picture jaydenseric  路  3Comments

natural-law picture natural-law  路  3Comments

paulieo10 picture paulieo10  路  3Comments