TL;DR — Quick Summary

oxipng optimizes PNG files losslessly. Multithreaded Rust rewrite of optipng — strip metadata, reduce file size, batch process images for web performance.

oxipng squeezes every byte from PNGs. Multithreaded, lossless, zero quality loss.

Installation

# macOS
brew install oxipng

# Arch Linux
sudo pacman -S oxipng

# Cargo
cargo install oxipng

Usage

# Optimize a PNG (in place)
oxipng image.png

# Optimization level (0-6, default 2)
oxipng -o 4 image.png

# Output to different file
oxipng image.png -o 4 --out optimized.png

# Batch optimize all PNGs
oxipng *.png

# Recursive directory
oxipng -r ./images/

# Strip all metadata
oxipng --strip all image.png

# Keep specific chunks
oxipng --strip safe image.png

# Preserve interlacing
oxipng --interlace 1 image.png

# Use all CPU threads
oxipng -t 0 image.png

# Dry run (show savings without modifying)
oxipng --pretend image.png

# Verbose output
oxipng -v image.png

Summary

  • oxipng optimizes PNGs losslessly — no quality loss
  • Multithreaded Rust rewrite of optipng (3-5x faster)
  • Strip EXIF, ICC, text metadata automatically
  • Optimization levels 0-6 for speed vs compression tradeoff
  • Perfect for CI/CD pipelines and web asset optimization