Breaking Changes:
- Supported Node.js version updated to 18.18 or higher.
- Replaced “gif2webp” with “sharp” for GIF-to-WebP conversions.
- Removed the “webpGif” section from .optimiztrc.cjs.
- Fine-tuned params in .optimiztrc.cjs.
- Replaced imagemin/guetzli-bin with 343dev/guetzli.
- Disabled parallel optimization of JPEG files in Lossless mode.
Guetzli uses a huge amount of RAM. In my case, when optimizing a file of about 30 MB, one process could use up to 12 GB of memory. If there are multiple files, parallel optimization with Guetzli consumes all available RAM, causing the system to use Swap, leading to slowdowns and freezes.
For this reason I decided to disable parallel optimization of JPEG files in Lossless mode. Now, it will take more time but will have less impact on the OS performance.
- Fixed Guetzli install.
- Fixed installing on Windows.
- Improved image processing workflow. Check the migration guide for details.
- Added an interactive log for image processing.
- Changed the “File already exists” message from “error” to “info,” now only shown in verbose mode.
- Added a notice that animated AVIF is not supported (unfortunately).
- Fixed the progress indicator in conversion mode. It now correctly shows the total number of items.
- Fixed output to the user directory. The original folder structure is now preserved (I hope so!).
❤️ Thank you for using Optimizt. If you have any suggestions or feedback, please don't hesitate to open an issue.
Here are the changes in this version:
- Added EXIF Orientation tag support for JPEG.
- Removed convert ratio check for AVIF and WebP.
- Improved JPEG lossless optimization process.
- Changed configuration file format to CJS.
SVGO config updated.
Minimum Node.js version is set to 18.17.
Check out migration guide.
Drop support for Node.js 14.
Fixed an issue with an incorrect path to the configuration file on Windows systems.
Removed removeOffCanvasPaths
plugin from SVGO config due to known bugs: svg/svgo#1732, svg/svgo#1646.
Removed import of removeUnknownsAndDefaults
plugin from the default config to make it easy to redefine the config on the user side.
Check out migration guide.
Fixed installation and included the configuration file to the package.
Added --config
flag, which allows specifying path to file with custom settings.
See more in README.
This package is now pure ESM.
In lossy mode, JPEG files are now processed by sharp module.
Fixed total saved size calculation.
Added file format to the success message in conversion mode.
Removed logging unsupported symbols in CI environment.
Added --output
flag, which allows output to be written to provided directory.
Removed pngquant-bin due to license issues.
Fixed “Cannot find module” error that occurred if Optimizt was installed using Yarn.
Fixed SVG processing.
Updated project dependencies.
Optimizt now has bigger file sizes for AVIF images. See:
Sometimes Optimizt could return empty JPEG files. Now it's fixed.
Added “Differences between ‘lossy’ and ‘lossless’” section to README.md.
Disabled cursor hiding in progress bar.
Added display of summary.
Fixed “Only YUV color space input jpeg is supported” error. Now Optimizt may set sRGB color space for images before processing them.
Spinner was replaced with a progress bar.
Added --force
flag to CLI, which allows creating AVIF and WebP even if output file size increased or file already exists.
Added workflows directory with examples of GitHub Actions workflows.
Enabled use of LZW compression to optimize GIF files in lossy mode.
Fixed ratio logging.
Added Troubleshooting section to README.md.
Added error handler for jpegoptim
child process.
Added AVIF support.
Fixed GIF to WebP conversion.
Bye-bye imagemin. Now we use optimizers directly.
Added a limit on the number of optimization tasks run simultaneously.
Fixed a bug with JPEG processing (jpegoptim could crash with some files).
Updated dependencies.
Unpinned dependencies versions to major range.
Added disabling coloring output when no TTY found.
Removed unused logic from formatBytes.
Optimized prepareFilePaths function.
Updated images used in README.
Prepared the package for publishing on GitHub.
Updated some deps, fixed small linter errors, added LICENSE.
We continue the glorious tradition of “Publish first, think later”.
Removed useless files from the bundled package.
First major version!
The script does everything described in README:
-
Compresses raster images lossy and lossless.
-
Optimizes SVG files preserving their readability.
-
Generates WebP versions while optimizing raster images.
Init version.