Recursively batch process files with pngquant

前端 未结 2 1396
[愿得一人]
[愿得一人] 2020-12-13 00:49

I have a lot of images that I would like to process with pngquant. They are organized in a pretty deep directory structure, so it is very time-consuming to manually cd

2条回答
  •  失恋的感觉
    2020-12-13 01:03

    With the fish shell you can run the following from the root of your project directory

    pngquant **.png
    

    Which will generate new files with extensions like -or8.png or -fs8.png.

    If you want to overwrite the existing files, you can use

    pngquant **.png --ext .png --force
    

提交回复
热议问题