Freedom251 › Image Compression Software
losslessly

What losslessly is
losslessly is a free, open-source command-line optimizer for image files on Linux, macOS, and Windows. It recursively searches folders for PNG, APNG, JPEG, GIF, WebP, and SVG files. PNG, JPEG, and WebP results decode to the same pixels as the originals, while GIF output keeps rendered frames and timing. SVG markup is minified. EXIF, ICC, XMP, and comments remain unless you use --strip. Files are processed locally and replaced only when the optimized result is smaller; otherwise they stay byte-for-byte unchanged. Temporary-file writes and renaming help preserve the original if a process stops during writing. The tool checks file signatures against extensions and reports decoding errors without changing files it cannot process. A --check mode writes nothing and exits with code 1 when shrinking is possible, supporting CI and lefthook hooks. Prebuilt binaries cover macOS and Linux on x86_64 and arm64, plus Windows on x86_64. Source installation needs Rust and a C compiler. Lossy compression and format conversion are excluded.
Who it suits
It suits developers and teams who want scripted, lossless optimization of local image collections. Its command-line and CI options fit automated build or pre-commit workflows.
What it does well
- Preserves pixels for PNG, JPEG, and WebP
- Recursively searches common image formats
- Keeps metadata unless --strip is used
- Supports CI checks with --check
- Prebuilt binaries cover major desktop platforms
What to know first
- No lossy compression or format conversion
- Skips lossy and animated WebP files
- AVIF and JPEG XL are not planned
- Source installation needs Rust and a C compiler
Verdict
losslessly focuses on local, lossless recompression with safeguards against unnecessary rewrites. It is a practical fit when format conversion and lossy size reductions are outside your requirements.
Facts from losslessly's own pages
- Automation
- The --check option writes nothing and exits with code 1 if any file could shrink, enabling CI checks. · github.com, 4 Oct 2026
- CI and hooks
- A --check mode can fail CI when files could shrink, and the README shows integration with lefthook pre-commit hooks. · github.com, 12 Oct 2026
- Data handling
- The README describes processing local files in place and replacing a file only when the result is smaller. · github.com, 4 Oct 2026
- Formats
- It searches directories recursively for PNG, APNG, JPEG, GIF, WebP and SVG files, with extensions in either case. · github.com, 12 Oct 2026
- GIF limit
- It leaves a GIF alone when its frames exceed the supported palette color count or when a frame turns opaque pixels transparent again. · github.com, 12 Oct 2026
- Image integrity
- PNG, JPEG and WebP output decodes to the same pixels as the input, while GIF output preserves rendered frames and timing. · github.com, 4 Oct 2026
- In-place optimization
- It replaces a file only when the optimized result is smaller and otherwise leaves it byte-for-byte untouched. · github.com, 12 Oct 2026
- Installation
- Prebuilt binaries are offered for macOS and Linux on x86_64 and arm64, and Windows on x86_64; it can also be installed with Cargo. · github.com, 12 Oct 2026
- Integrity checks
- It checks file magic bytes against extensions and reports decoding errors without changing files it cannot process. · github.com, 12 Oct 2026
- License
- The repository is released under the MIT license. · github.com, 12 Oct 2026
- Lossless behavior
- PNG, JPEG and WebP output decodes to the same pixels as input, while GIF output preserves rendered frames and timing. · github.com, 12 Oct 2026
- Maker
- The GitHub profile identifies the maker as Kamil Doroszewicz and lists Poland as the location. · github.com, 4 Oct 2026
- Metadata
- EXIF, ICC profiles, XMP and comments are preserved unless the --strip option is used. · github.com, 12 Oct 2026
- Notable limits
- It does not do lossy compression or format conversion, and AVIF and JPEG XL are not on its roadmap. · github.com, 4 Oct 2026
- Product
- losslessly is a command-line tool that recompresses PNG, JPEG, GIF and WebP files and minifies SVG markup. · github.com, 12 Oct 2026
- Purpose
- losslessly is a command-line image optimizer that recompresses PNG, JPEG, GIF and WebP files and minifies SVG markup. · github.com, 4 Oct 2026
- Safety
- Writes use a temporary file in the same directory and rename it over the original, so the original remains if the process dies mid-write. · github.com, 12 Oct 2026
- Scope
- Lossy compression and format conversion are out of scope, and AVIF and JPEG XL are not on the roadmap. · github.com, 12 Oct 2026
- Source install
- Source installation requires a Rust toolchain and C compiler. · github.com, 4 Oct 2026
- SVG precision
- SVG output uses svgo's default numeric precision, so it does not have a bit-level guarantee. · github.com, 12 Oct 2026
- Tuning
- PNG compression supports effort levels 0–6, and the optional Zopfli mode is slower but produces somewhat smaller files on most images. · github.com, 12 Oct 2026
- WebP limit
- It skips lossy and animated WebP files; only lossless still images are re-encoded. · github.com, 12 Oct 2026
Where losslessly stands on Freedom251
- Image Compression Software#85 of 85