Gem 用 Yahoo Smusher 为你的网站提速

huacnlee · 2011年11月23日 · 最后由 welkang 回复于 2012年12月14日 · 5043 次阅读

主要是优化图片大小的,有 smusher 这个 Gem

https://github.com/grosser/smusher

$ smusher /apps/ts/public/images
smushing /apps/rs/public/images/social/facebook_icon.png
2887 -> 132                              = 4%

smushing /apps/rs/public/images/social/myspace_icon.png
3136 -> 282                              = 8%

smushing /apps/rs/public/images/dvd/dvd_1.png
5045 -> 4                                = 0%
reverted!
...

原文: http://adventuresincoding.com/2011/11/speed-up-your-websites-with-smusher

额,这么好的东西没人关注啊!

我之前就已經默默的收藏了。。

什么原理啊。。

可以考虑在 Ruby-China 里图片去又拍前处理一下

很不错,收藏了

Good, Thanks

http://optipng.sourceforge.net

optipng -o7 /path/to/folder/*.png

感谢分享!之前还直接上传到这儿优化 http://www.smushit.com/ysmush.it/ ,有了这个 gem 就方便多了。

需要 登录 后方可回复, 如果你还没有账号请 注册新账号