Skip to content

Latest commit

 

History

60 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Optimizer

GitHub package.json version GitHub All Releases GitHub

A fast, private desktop image optimizer.

A free and open source desktop app for compressing raster images and optimizing vector graphics. Files are processed locally on your computer.

Image Optimizer interface

Features

  • Optimize JPEG, PNG, GIF, and SVG files in batches.
  • Drop individual images or entire folders; nested folders are scanned recursively.
  • Compare original and optimized images with an interactive before/after preview.
  • Review per-file sizes, status, savings, total reduction, and elapsed time.
  • Adjust JPEG and PNG quality before running a job.
  • Convert JPEG and PNG images to WebP.
  • Strip metadata and control where optimized files are written.
  • Save results to a configurable output folder, add a .min suffix, or replace the source file.
  • Reveal completed files in Finder, Explorer, or the Linux file manager.
  • Download and install published updates from inside the app.

Supported formats

Input Optimizer Output
JPEG / JPG mozjpeg JPEG or WebP
PNG pngquant PNG or WebP
GIF gifsicle GIF
SVG SVGO SVG

WebP conversion is powered by cwebp.

Download

Download the latest installer from GitHub Releases.

  • macOS: DMG and ZIP for Apple Silicon and Intel
  • Windows: NSIS installer
  • Linux: Snap package

Command line

The app ships an imgopt command that uses the same bundled optimizers.

  • macOS: choose Image Optimizer → Install Command Line Tool… to link it into /usr/local/bin.
  • Windows: the installer adds resources\bin from the install directory to your user PATH; open a new terminal after installing. Uninstalling removes it.
imgopt                          # asks what to optimize and how
imgopt ./images                 # writes to ./images/minified
imgopt photo.jpg --webp -s      # writes minified/photo.min.webp
imgopt ./assets --in-place -s   # logo.min.png next to logo.png
imgopt ./images --json          # machine-readable report
imgopt ./assets --in-place -y   # overwrite originals without asking

Without paths it walks you through the options and prints the equivalent command at the end. In a terminal it shows a progress bar and asks before overwriting originals. In scripts and CI, paths are required and overwriting requires --yes.

Run imgopt --help for all options. The exit code is 1 when any file fails, 2 on invalid arguments and 130 when you decline to overwrite.

Development

Requirements

  • Node.js 24
  • pnpm 10
  • macOS: Xcode Command Line Tools (xcode-select --install) and CMake to build universal JPEG and WebP compressors. Preparation runs automatically before development and production builds and is reused until dependencies are reinstalled. The first WebP build downloads pinned WebP and libpng sources and verifies their SHA-256 checksums; installed apps need neither build tools nor network access for optimization.

Install dependencies and start the Electron app with hot reload:

pnpm install --frozen-lockfile
pnpm dev

Quality checks

Run the same checks used by CI:

pnpm check
pnpm format:check
pnpm build

pnpm check runs ESLint, TypeScript checks, and the Vitest test suite.

pnpm prepare:compressors && pnpm test:compressors tests real JPEG, PNG, GIF, and SVG optimization and JPEG/PNG conversion to WebP. CI runs these checks on both Apple Silicon and Intel Macs; macOS releases also run them before packaging.

Packaging

Build an unpacked application directory:

pnpm package

Platform-specific packages can be created with:

pnpm package:mac
pnpm package:win
pnpm package:linux

For an unsigned, non-notarized macOS package suitable for local testing, run:

pnpm package:mac:local

Generated packages are written to dist.

Tech stack

  • Electron
  • Vue 3
  • TypeScript
  • Vite
  • Tailwind CSS and shadcn-vue
  • Vitest

Related

Copyright (c) 2021-present, Anton Reshetov.

Releases

Sponsor this project

Packages

Used by

Contributors

Languages