How to optimize png format image in command line mode? The answer is Optipng ,Optipng is a simple and useful tool for optimizing png image runs in command line mode.