Forrest logo
back to the optipng tool

optipng:tldr:957fa

optipng: Compress a PNG and remove all metadata.
$ optipng -strip all ${filename-png}
try on your machine

The command "optipng -strip all ${filename-png}" is used to optimize and compress PNG image files.

  • "optipng" is the name of the command-line tool that is being used in this command.
  • "-strip all" is an option for optipng, which indicates that all metadata and auxiliary color profiles should be stripped from the image. This helps reduce the file size of the image.
  • "${filename-png}" is a variable in the command, which represents the name of the PNG file that you want to optimize. You need to replace "${filename-png}" with the actual filename and extension of your PNG image.

To use this command, you need to have optipng installed on your system. After that, open your terminal or command prompt, navigate to the directory where the PNG image file is located, and then run the command by replacing "${filename-png}" with the actual filename of your PNG image.

For example, if you have an image named "image.png" and want to optimize it, the command would be: optipng -strip all image.png

After executing the command, optipng will optimize the PNG image by stripping unnecessary metadata and color profiles, resulting in a compressed version of the image with a smaller file size.

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