optipng

PNG file optimization utility. More information: <http://optipng.sourceforge.net>.

Install

All systems
curl cmd.cat/optipng.sh
Debian Debian
apt-get install optipng
Ubuntu
apt-get install optipng
Alpine
apk add optipng
Arch Arch Linux
pacman -S optipng
image/svg+xml Kali Linux
apt-get install optipng
CentOS
yum install optipng
Fedora
dnf install optipng
Windows (WSL2)
sudo apt-get update sudo apt-get install optipng
OS X
brew install optipng
Raspbian
apt-get install optipng
Docker
docker run cmd.cat/optipng optipng powered by Commando

PNG file optimization utility. More information: <http://optipng.sourceforge.net>.

  • Compress a PNG with default settings:
    optipng path/to/file.png
  • Compress a PNG with the best compression:
    optipng -o7 path/to/file.png
  • Compress a PNG with the fastest compression:
    optipng -o0 path/to/file.png
  • Compress a PNG and add interlacing:
    optipng -i 1 path/to/file.png
  • Compress a PNG and preserve all metadata (including file timestamps):
    optipng -preserve path/to/file.png
  • Compress a PNG and remove all metadata:
    optipng -strip all path/to/file.png

© tl;dr; authors and contributors