google的 pagespeed tools 中提供了图片的优化建议,其中提到了一些图片压缩工具。
顾名思义,针对png格式图片的压缩
命令行操作,mac下可以通过brew安装 brew install optipng
基本操作 `optipng <filename>`,也可自行指定压缩等级 `optipng -o<level> <filename>`
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |