Forrest logo
back to the optipng tool

optipng:tldr:ad041

optipng: Compress a PNG and preserve all metadata (including file timestamps).
$ optipng -preserve ${filename-png}
try on your machine

The command optipng is a command-line tool used for optimizing PNG (Portable Network Graphics) images. In this specific command, -preserve flag is used to maintain certain metadata or attributes of the PNG file while optimizing it.

${filename-png} is a placeholder that needs to be replaced with the actual filename of the PNG image. For example, if the file is called image.png, then you would replace ${filename-png} with image.png.

Overall, this command instructs optipng to optimize the specified PNG image file while preserving specific attributes of the image.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the optipng tool