Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/JuZiSang/picgo-plugin-compress
Image compression plugin for PicGo
https://github.com/JuZiSang/picgo-plugin-compress
picgo picgo-plugin
Last synced: 3 months ago
JSON representation
Image compression plugin for PicGo
- Host: GitHub
- URL: https://github.com/JuZiSang/picgo-plugin-compress
- Owner: juzisang
- License: mit
- Created: 2020-04-20T02:51:07.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-04-21T04:19:35.000Z (over 1 year ago)
- Last Synced: 2024-07-08T22:03:24.570Z (4 months ago)
- Topics: picgo, picgo-plugin
- Language: TypeScript
- Homepage:
- Size: 3.82 MB
- Stars: 123
- Watchers: 2
- Forks: 32
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-PicGo - picgo-plugin-compress
README
## picgo-plugin-compress
[![build](https://img.shields.io/github/workflow/status/juzisang/picgo-plugin-compress/NPMPublish/master?color=brightgreen)](https://github.com/JuZiSang/picgo-plugin-compress/actions)
[![dm](https://img.shields.io/npm/dm/picgo-plugin-compress?color=brightgreen)](https://npmcharts.com/compare/picgo-plugin-compress?minimal=true)
[![v](https://img.shields.io/npm/v/picgo-plugin-compress?color=brightgreen)](https://www.npmjs.com/package/picgo-plugin-compress)
[![mit](https://img.shields.io/badge/license-mit-brightgreen.svg)](https://github.com/JuZiSang/picgo-plugin-compress/blob/master/LICENSE)用于 [PicGo](https://github.com/Molunerfinn/PicGo) 的图片压缩插件,支持 [TinyPng](https://tinypng.com/) [ImageMin](https://github.com/imagemin/imagemin)
## 安装失败参考
- https://github.com/JuZiSang/picgo-plugin-compress/issues/2
## 安装
### [PicGo-Core](https://github.com/PicGo/PicGo-Core) 安装
- 安装 `picgo add compress`
- 选择使用 `picgo use transformer`
- 参数配置 `picgo config plugin compress`
compress 选择压缩工具
默认选项- [tinypng](https://tinypng.com/) 无损压缩,需要上传到 tinypng
- [imagemin](https://github.com/imagemin/imagemin) 压缩过程不需要经过网络,但是图片会有损耗
- image2webp 本地有损压缩,支持 GIF 格式有损压缩
注意:有些图床(比如 sm.ms)不支持 webp 图片格式,会上传失败key 可选
- 在 [developers](https://tinypng.com/developers) 中申请
- 逗号`,`隔开,可使用多个 Key 叠加使用次数### [PicGo-Gui](https://github.com/Molunerfinn/PicGo) 在线安装
- 打开详细窗口 > 插件设置 > 搜索 `compress` 即可安装,配置同上
- 离线安装参考[这里](https://picgo.github.io/PicGo-Core-Doc/zh/dev-guide/deploy.html#gui%E6%8F%92%E4%BB%B6)## 压缩效果对比
| 类型 | tinypng | imagemin | image2webp |
| ------ | ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| 原大小 | 1.5 MB | 1.5 MB | 1.5 MB |
| 压缩后 | 315 KB | 411 KB | 216 KB |
| 效果图 | ![](https://raw.githubusercontent.com/JuZiSang/picgo-plugin-compress/master/tests/tinypng.png) | ![](https://raw.githubusercontent.com/JuZiSang/picgo-plugin-compress/master/tests/imagemin.png) | ![](https://raw.githubusercontent.com/JuZiSang/picgo-plugin-compress/master/tests/imagemin_webp.webp) |