Skip to content

Releases: newmatik/image-optimizer

v0.2.1

Choose a tag to compare

@github-actions github-actions released this 29 Jun 20:02
7f1f57a

imageopt — cross-platform image optimizer (CLI + GitHub Action)

A fast, reliable, single-binary image optimizer in the spirit of ImageOptim —
optimizes JPEG, PNG, GIF, WebP and SVG in place, reports how much space was
saved, and is built for CI automation. No runtime dependencies; all codecs are
compiled in.

Highlights

  • Lossless by default, opt-in lossy (--lossy / -q).
  • Safe to run on every push: lossless is deterministic and idempotent, and
    lossy converges after one pass (--min-savings), so a commit-back workflow
    won't keep rewriting or degrading images.
  • Never corrupts or enlarges a file: every re-encode is re-decoded and
    validated, the smallest valid result wins, and writes are atomic.
  • Cross-platform prebuilt binaries: macOS (arm64/x64), Linux (x64/arm64),
    Windows (x64), each with a SHA256 checksum.

Changes in 0.2.1

  • Renamed the Action to Newmatik Image Optimizer for the GitHub Marketplace
    listing (the uses: newmatik/image-optimizer@… reference is unchanged) and
    sharpened the listing description. No functional changes vs 0.2.0.

Use the Action

- uses: actions/checkout@v4
- uses: newmatik/image-optimizer@v0.2.1
  with:
    paths: "src/assets"
    recursive: "true"
# optionally commit the result back, or add `check: "true"` to gate a PR

Install the CLI

Download the binary for your platform from the assets below, or build from source
(cargo install --path crates/cli). Licensed GPL-3.0-or-later.

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 29 Jun 19:43
add2750

imageopt — cross-platform image optimizer (CLI + GitHub Action)

A fast, reliable, single-binary image optimizer in the spirit of ImageOptim —
optimizes JPEG, PNG, GIF, WebP and SVG in place, reports how much space was
saved, and is built for CI automation. No runtime dependencies; all codecs are
compiled in.

Highlights

  • Lossless by default, opt-in lossy (--lossy / -q).
  • Safe to run on every push: lossless is deterministic and idempotent, and
    lossy now converges after one pass (see --min-savings below), so a
    commit-back workflow won't keep rewriting or degrading images.
  • Never corrupts or enlarges a file: every re-encode is re-decoded and
    validated, the smallest valid result wins, and writes are atomic.
  • Cross-platform prebuilt binaries: macOS (arm64/x64), Linux (x64/arm64),
    Windows (x64), each with a SHA256 checksum.

What's new in 0.2.0

  • --min-savings <PERCENT> — only rewrite a file if it shrinks by at least
    this much. --lossy defaults it to 10% so repeated runs converge instead
    of slowly degrading images; pass --min-savings 0 for one-shot max squeezing.
    Exposed on the Action as the min-savings input.
  • The savings gate is enforced for any smaller candidate even with
    --keep-larger.
  • ⚠️ Breaking (library API only): adds a public field to OptimizeOptions
    in imageopt-core; hence the 0.2.0 minor bump. No change for CLI or Action
    users.

Use the Action

- uses: actions/checkout@v4
- uses: newmatik/image-optimizer@v0.2.0
  with:
    paths: "src/assets"
    recursive: "true"
# optionally commit the result back, or add `check: "true"` to gate a PR

Install the CLI

Download the binary for your platform from the assets below, or build from source
(cargo install --path crates/cli). Licensed GPL-3.0-or-later.

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 29 Jun 18:51
7862af3
imageopt: cross-platform image optimizer (CLI)

A fast, reliable, single-binary image optimizer in the spirit of ImageOptim, built in Rust. Optimizes JPEG, PNG, GIF, WebP and SVG in place and reports space saved. Lossless by default, opt-in lossy. Designed for CI automation.

- Engine (imageopt-core): content-based format detection; codecs propose candidate encodings and the engine keeps the smallest that re-decodes; never enlarges or corrupts a file (atomic temp-file+rename writes, panic-safe across the C codecs); parallel across files via rayon; decompression-bomb guard.
- Codecs: JPEG (true-lossless jpegtran-style coefficient transform, plus lossy re-encode via mozjpeg), PNG (oxipng + libimagequant), WebP (libwebp), SVG (usvg normalize/minify), static GIF. Lossy raster re-encoders honor the metadata policy.
- CLI (imageopt): --lossy/-q, --png-level, --strip, --dry-run, --backup, --check (CI gate), --json, -r, -j; live progress, table and JSON output, meaningful exit codes.
- CI/distribution: fmt + clippy (-D warnings) + tests on Linux/macOS/Windows; tag-triggered release matrix building self-contained binaries for macOS (arm64/x64), Linux (x64/arm64) and Windows (x64) with SHA256 checksums; composite GitHub Action for optimize-and-commit or PR gating.

Licensed GPL-3.0-or-later.