[CLI] Batch image compression.
See original GitHub issueI’m trying compress all of image in a folder at once.
So, I’ve execute this command,
squoosh-cli --mozjpeg '{"quality":75,"baseline":false,"arithmetic":false,"progressive":true,"op timize_coding":true,"smoothing":0,"color_space":3,"quant_table":3,"trellis_multipass":false,"trel lis_opt_zero":false,"trellis_opt_table":false,"trellis_loops":1,"auto_subsample":true,"chroma_sub sample":2,"separate_chroma_quality":false,"chroma_quality":75}' -d output ./*
After that Squoosh start compressing the folder images. It’s nicely showing 1.2.3.4.5.6…/17 - image decoding… But in few seconds, it’s gives error and stack on decoding screen.
[Error: EISDIR: illegal operation on a directory, read] {
errno: -4068,
code: 'EISDIR',
syscall: 'read'
}
Worker error: Error [RuntimeError]: abort(Error: EISDIR: illegal operation on a directory, read). Build with -s ASSERTIONS=1 for more info.
at process.w (\npm\node_modules\@squoosh\cli\build\index.js:7:376640)
at process.emit (events.js:327:22)
at processPromiseRejections (internal/process/promises.js:209:33)
at processTicksAndRejections (internal/process/task_queues.js:98:32)
- Squoosh CLI version: 0.5.0
- OS w/ version: Windows 8
- Node version: v12.18.2
- npm version: 6.14.9
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:12 (1 by maintainers)
Top Results From Across the Web
How to Optimize and Compress JPEG or PNG Images in Linux ...
To compress batch or multiple PNG images at once, just go the directory where all images resides and run the following command to...
Read more >Batch Image compression tool for optimizing thousands of ...
I'm looking for some kind of tool that'll take a folder full of JPG pictures and will recompress them to their "optimal" compression...
Read more >How Optimized Are Your Images? Meet ImageOptim-CLI, A ...
ImageOptim beats any single lossless optimizer by bundling all of them. It works by finding the best combination of compression parameters and ...
Read more >batch - How can I compress images? - Ask Ubuntu
The pictures should be batch compressed, preferably via a GUI. ... single image to find good settings, then use the CLI to compress...
Read more >How to batch compress images with Imagemagick or similar ...
In my experience, Imagemagick is the best image compressor program, and it gives one the most control over how to compress images. I...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For me works without the star, just like these:
npx @squoosh/cli --mozjpeg ‘{“quality”:60}’ -d Squooshed ./
BTW, To do it from .bat you have to do it without the single quotes, like this:
npx @squoosh/cli --mozjpeg {“quality”:60} -d Squooshed ./
Windows 10. Node v14.15.1 Squoosh CLI v0.7.2
Yeah, I have heard that the CLI is currently causing problems on Windows. I’ll look into this.