Closed davidwolfpaw closed 6 years ago
Thanks @davidwolfpaw.
This is missing from the examples but the following should work, given this folder structure:
.
├── README.md
├── images
│ ├── sub-dir
│ │ └── no-thanks.png
│ └── yes-please.jpg
You could run the following to only optimise images/yes-please.jpg
and not images/sub-dir/no-thanks.png
.
imageoptim 'images/*.*'
Internally, ImageOptim-CLI uses https://github.com/isaacs/node-glob#glob-primer.
Please let me know if this works out.
Please reopen if you still need anything, thanks.
Thanks for the CLI tool!
I think that it would be useful to have a flag to choose whether or not you recurse through directories to find images. There are times that I would like to optimize a folder, but not the subfolders.