How To Install Optipng?

How To Install Optipng?

optipng

PNG image file optimization utility.

Maintainer: Debian PhotoTools Maintainers



Section: graphics

Install optipng

  • Debian apt-get install optipng Click to copy
  • Ubuntu apt-get install optipng Click to copy
  • Alpine OS apk add optipng Click to copy
  • Arch Linux pacman -S optipng Click to copy
  • Kali Linux apt-get install optipng Click to copy
  • CentOS yum install optipng Click to copy
  • Fedora dnf install optipng Click to copy
  • Raspbian apt-get install optipng Click to copy
  • macOS brew install optipng Click to copy

PNG image file optimization utility.

How to use optipng?

Below are few example commands for optipng that you can use in the terminal.

Compress a PNG with default settings:
optipng path/to/file.pngClick to copy
Compress a PNG with best compression:
optipng -o7 path/to/file.pngClick to copy
Compress a PNG with fastest compression:
optipng -o0 path/to/file.pngClick to copy
Compress a PNG and add interlacing:
optipng -i 1 path/to/file.pngClick to copy
Compress a PNG and preserve all metadata (including file timestamps):
optipng -preserve path/to/file.pngClick to copy
Compress a PNG and remove all metadata:
optipng -strip all path/to/file.pngClick to copy
Install the latest version of optipng in Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS from terminal. To install the optipng just copy the above command for your OS and run into terminal. After you run the command it will grab the latest version of optipng from the respository and install it in your computer/server.