Google has removed all CLI features from their Squoosh project.
This fork merges newer Squoosh browser features with the old removed CLI stuff. It does not aim to strictly retain compatibility with the original project, but does aim to preserve old CLI functionality, including the UI CLI command generator.
Usage:
- This fork currently runs over at https://squoosh.frostoven.com
- Installation and usage details here: https://squoosh.frostoven.com/cli
For now, the core purpose of this fork is to fix bugs in the CLI portion of the code. The CLI portion had quite a few problems when it was retired from the original project, many of which are now fixed in this fork.
I maintain these features and fix bugs in my spare time, and generally have my hands full with an indie game I'm making. Please consider supporting my work to get more hands on deck; I would like to hire someone to work on this project full-time so that it may reach its full potential.
First off, I'd like to give a huge thank you to everyone who has contributed to this fork!
Major changes:
- Fixes an issue where the original Squoosh CLI would attempt to consume all
target images at once, causing Node to crash when dealing with data exceeding
~500MB (the max concurrent image limit is now automatically set to your CPU
core count, override with
-c your_number
). This fork has been confirmed to work with datasets exceeding 10GB containing thousands of images. - Fixes an issue where the CLI terminal output would corrupt when processing a large amount of images.
- The original CLI tool ignored almost all custom user options. This is (hopefully) completely fixed now.
- This fork adds Node 18+ support.
Important: Always delete .tmp
and build
before doing a prod build, and
delete .tmp
if you're experiencing weird bugs during development. It appears
to occasionally get corrupted by some process duplication.
This fork introduces additional pages as static HTML. I didn't have the time to
figure out how to correctly hook this up into the dev process (though it's
integrated into prod); for now, static pages can be tested in dev with
npx http-server staticPages
.
The original README follows below.
Squoosh is an image compression web app that reduces image sizes through numerous formats.
Squoosh does not send your image to a server. All image compression processes locally.
However, Squoosh utilizes Google Analytics to collect the following:
- Basic visitor data.
- The before and after image size value.
- If Squoosh PWA, the type of Squoosh installation.
- If Squoosh PWA, the installation time and date.
To develop for Squoosh:
- Clone the repository
- To install node packages, run:
npm install
- Then build the app by running:
npm run build
- After building, start the development server by running:
npm run dev
Squoosh is an open-source project that appreciates all community involvement. To contribute to the project, follow the contribute guide.