OptiPNG

OptiPNG is a command-line tool that compresses portable network graphics (PNG) files without losing semantic information. Now let’s see how to install OptiPNG on different Linux distributions and OSX. Use one of the following commands according to Your operating system:

For Debian/Ubuntu/Kali Linux:

apt-get install optipng

For Alpine:

apk add optipng

For Arch Linux:

pacman -S optipng

For CentOS:

yum install optipng

For Fedora:

dnf install optipng

For OSX:

brew install optipng

Optimize and Compress JPEG or PNG Images in Linux Command line

Today there are many GUI tools that compress and optimize the images, which are very useful. But if you are terminal addicted and want to compress and optimize the images in the terminal before uploading to the cloud, then you can do it. There are two tools by using which we can compress and optimize images. These are –

  • jpegoptim
  • OptiPNG

Similar Reads

jpegoptim

jpegoptim is a command-line utility to optimize and compress JPEG/JFIF and JPG files. This utility support lossless optimization which is based on optimizing the Huffman tables. Now let’s see how to install the jpegoptim on different Linux distributions....

Installation

The jpegoptim tool is available to install on most of the Linux package managers. Use one of the following commands according to your operating system to install jpegoptim utility....

How to use Jpegoptim Image Optimizer

The syntax of jpegoptim is very simple to use but note that the jpegoptim compresses the file and replaces them with original file and to avoid this we need to mention the directory after jpegoptim command we will see later how to do that. To use the jpegoptim utility for one file, just mention the filename after the jpegoptim command, like:...

OptiPNG

OptiPNG is a command-line tool that compresses portable network graphics (PNG) files without losing semantic information. Now let’s see how to install OptiPNG on different Linux distributions and OSX. Use one of the following commands according to Your operating system:...

Using OptiPNG Image Optimizer

The syntax of using OptiPng is very simple, we have to just mention the name of the png file after the optipng command....