HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

optipng — PNG file optimization utility. More information: <https://optipng.sourceforge.net/optipng-7.9.1.man1

Submitted by: @import:tldr-pages··
0
Viewed 0 times
optipngcommandoptimizationclifilemorepngutility

Problem

How to use the optipng command: PNG file optimization utility. More information: <https://optipng.sourceforge.net/optipng-7.9.1.man1.html>.

Solution

optipng — PNG file optimization utility. More information: <https://optipng.sourceforge.net/optipng-7.9.1.man1.html>.

Compress a PNG with default settings:
optipng {{path/to/file.png}}


Compress a PNG with the best compression:
optipng -o {{7}} {{path/to/file.png}}


Compress a PNG with the fastest compression:
optipng -o {{0}} {{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}}

Code Snippets

Compress a PNG with default settings

optipng {{path/to/file.png}}

Compress a PNG with the best compression

optipng -o {{7}} {{path/to/file.png}}

Compress a PNG with the fastest compression

optipng -o {{0}} {{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}}

Context

tldr-pages: common/optipng

Revisions (0)

No revisions yet.