Free tools ♡
Developer tool

NanoImage CLI

Compress, resize, convert, and clean image files locally with a simple command-line tool.

npm install -g nanoimage
nanoimage compress ./images --quality 75 --output ./compressed
nanoimage webp ./public --quality 82 --remove-exif
nanoimage resize hero.jpg --width 1200 --output hero-1200.jpg
Local processing

Files never leave your machine. No uploads, no server.

Batch optimization

Process entire folders with a single command.

WebP conversion

Convert any image to WebP for smaller web assets.

CI/CD friendly

Drop it into build scripts and GitHub Actions.

JSON output

Machine-readable results for automation workflows.

EXIF removal

Clean metadata from images before publishing.

5 commands. Ready to use.

compressReduce image file size with quality control.
nanoimage compress photo.jpg --quality 75 --output photo-compressed.jpg
resizeChange image dimensions by pixels, percentage, or max width.
nanoimage resize hero.jpg --width 1200 --output hero-1200.jpg
convertConvert images between JPG, PNG, and WebP.
nanoimage convert logo.png --to jpg --output logo.jpg
webpFast WebP conversion for web-ready images.
nanoimage webp photo.jpg --quality 80 --output photo.webp
remove-exifStrip metadata from images before sharing.
nanoimage remove-exif photo.jpg --output photo-clean.jpg

Built for real workflows

  • Optimize website images before deployment
  • Compress blog images before publishing
  • Convert asset folders to WebP
  • Clean metadata from product photos in bulk
  • Automate image pipelines in GitHub Actions
  • Get JSON output for build logs and CI reports

Get started in seconds

Global install

npm install -g nanoimage

Run without installing

npx nanoimage compress input.jpg --quality 75

Requires Node.js 18 or later.  ·  npm package

FAQ

Does NanoImage CLI upload my images?

No. CLI processing happens entirely on your local machine. Files are never sent to any server.

Can I use it in CI/CD?

Yes. Use commands in npm scripts, build pipelines, or GitHub Actions. The --json flag gives machine-readable output for automation.

Which image formats are supported?

CLI v1 focuses on JPG, PNG, and WebP. More formats may be added in future versions.

Can I process entire folders?

Yes. Pass a directory as input and an output directory. Directories are processed recursively by default.