node.js 图像压缩
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7073784/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
node.js image compression
提问by Mark
I'm looking for a node.js module.
我正在寻找一个 node.js 模块。
A node.js module that I can use to serve compressed images of the sort by the smushit service.
一个 node.js 模块,我可以用它来提供 smushit 服务排序的压缩图像。
Is there such a module?
有这样的模块吗?
Thanks
谢谢
采纳答案by Alfred
回答by tobeyouth
maybe you can use imagemin
也许你可以使用 imagemin
github:https://github.com/imagemin/imagemin
github:https: //github.com/imagemin/imagemin
It can work.
它可以工作。
回答by sam100rav
You can use GraphicsMagickfor node.js.
您可以将GraphicsMagick用于 node.js。
回答by cleversprocket
For anyone googling this, GraphicsMagic is hosted on NPM as gm: https://www.npmjs.org/package/gm
对于任何使用谷歌搜索的人,GraphicsMagic 作为 gm 托管在 NPM 上:https: //www.npmjs.org/package/gm
回答by Юрий Светлов
Detected path and can use combination compressing. SVGJPGPNGGIF
检测到的路径,可以使用组合压缩。 SVGJPGPNGGIF
回答by Robert Claypool
I switched from gmto https://github.com/lovell/sharpfor better performance.
我从https://github.com/lovell/sharp切换gm到更好的性能。
回答by Chetan pawar
for compression of image compress-imagepackage is also good option https://www.npmjs.com/package/compress-images
用于压缩图像compress-image包也是不错的选择 https://www.npmjs.com/package/compress-images

