Skip to content

Commit

Permalink
v1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
supine0703 committed Aug 5, 2024
1 parent 962b0ec commit 961f88a
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 56 deletions.
71 changes: 37 additions & 34 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ This is a fork of the [picgo-plugin-compress-webp-lossless](https://github.com/
- Compress Type (A detailed comparative analysis table will be made later):
- [tinypng](https://tinypng.com/): Damaged compression, need to upload to tinypng.
- [imagemin](https://github.com/imagemin/imagemin): Local lossy compression.
- image2webp: Local lossy compression to webp, support GIF lossy compression.
- imagemin-webp: Local lossy compression to webp, support GIF lossy compression.
Note: Some beds (such as sm.ms) do not support webp image format and will fail to upload.
- [webp-converter](https://www.npmjs.com/package/webp-converter): Local lossy compression to webp, support GIF lossy compression, smaller size, faster.
- Gif Compress Type:
- webp-converter: Local lossy compresses gif to webp.
- imagemin-gif2webp:
- Auto Refresh TinyPng Key Across Months:
- yes: The TinyPng API Key status is automatically refreshed if it is detected to be across months (different from the last time it was used).
- no: No detection, but still record the date.
Expand Down Expand Up @@ -113,39 +116,54 @@ So there is ***`picgo-plugin-compress-next`*** birth 🎉
</td>
<td>❌</td>
<td>
If the valid Key reaches the number of times used, no access <br>
If the valid Key reaches the number of times, the access is stopped<br>
The configuration file can be reset only after it is deleted
</td>
</tr>
<tr>
<th rowspan=1>imagemin</th>
<th rowspan=3>imagemin</th>
<td>✅</td>
<td>Support for local lossy conversion</td>
<td>
<b>mozjpeg</b>:<br>
Support for local lossy conversion
</td>
<td>✅</td>
<td>Support for local lossy conversion</td>
<td>
<b>mozjpeg</b>:<br>
Support for local lossy conversion
</td>
</tr>
<tr>
<th rowspan=2>imagemin2webp</th>
<td>✅</td>
<td>Support for local lossy conversion</td>
<td>
<b>imagemin-webp</b>:<br>
Supports local lossy conversion to <b>webp</b>
</td>
<td>✅</td>
<td>Support for local lossy conversion</td>
<td>
<b>imagemin-webp</b>:<br>
Supports local lossy conversion to <b>webp</b>
</td>
</tr>
<tr>
<td>✅</td>
<td>Support gif to webp</td>
<td>
<b>imagemin-gif2webp</b>:<br>
Supports <b>gif</b> local lossy conversion to <b>webp</b>
</td>
<td>❌</td>
<td>Conversion from gif to webp is not supported</td>
</tr>
<tr>
<th rowspan=1>webp-converter</th>
<th rowspan=2>webp-converter</th>
<td>✅</td>
<td>
jpeg, png, webp compressed to webp<br>
Support gif compression to webp
</td>
<td>❌</td>
<td>Cannot use webp-converter</td>
<td>jpeg, png, webp compressed to webp</td>
<td rowspan=2>❌</td>
<td rowspan=2>Cannot use webp-converter</td>
</tr>
<tr>
<td>✅</td>
<td>Support gif compression to webp</td>
</tr>
<!-- <tr>
<td>✅</td>
Expand All @@ -167,27 +185,12 @@ So there is ***`picgo-plugin-compress-next`*** birth 🎉
- [x] Refreshing of `all keys`
- [x] `Automatically` refresh `valid keys` if across months
- [x] add `webp-converter` (Smaller volume and Higher speed)
- [ ] Add ability of `gift 2 webp` (imagemin2webp & webp-converter) (under test)
- [ ] Add ability of `gift 2 webp`
- [x] Use `webp-converter`'s `gwebp`
- [ ] `imagemin-gif2webp`


# Reporting Issues

[You can click here directly to create an issue](https://github.com/supine0703/picgo-plugin-compress-next/issues/new)



<!-- # Picgo Plugin Compress Webp Lossless
The original project has been inactive for quite some time. It's intended to provide continued maintenance and support.
This project is a plugin for [PicGo](https://github.com/Molunerfinn/PicGo) and [PicGo-Core](https://github.com/PicGo/PicGo-Core), enabling image compression using the remote service provided by [TinyPNG](https://tinypng.com/) or local compression using [imagemin](https://github.com/imagemin/imagemin).
Additionally, it supports lossless converting images to the WebP format.
Several enhancements and updates have been implemented in this fork:
- **Dependency Upgrades**: The project dependencies have been updated to their latest versions, ensuring better compression efficiency.
- **Syntax Upgrade**: The codebase has been migrated to use ES modules, providing better compatibility with modern JavaScript ecosystems.
- **Lossless Compression**: Local image compression has been improved to offer lossless compression, resulting in better compression quality.
Feel free to contribute to this project or report any issues you encounter. Your feedback and contributions are greatly appreciated! -->
54 changes: 37 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@
- Compress Type (过段时间会制作详细对比分析表):
- [tinypng](https://tinypng.com/): 无损压缩,需要上传到 tinypng
- [imagemin](https://github.com/imagemin/imagemin): 本地有损压缩
- image2webp: 本地有损压缩为 webp,支持 GIF 格式有损压缩
- imagemin-webp: 本地有损压缩为 webp,支持 GIF 格式有损压缩
注意:有些图床(比如 sm.ms)不支持 webp 图片格式,会上传失败
- [webp-converter](https://www.npmjs.com/package/webp-converter): 本地有损压缩为 webp,支持 GIF 格式有损压缩,体积更小,速度更快
- Gif Compress Type:
- webp-converter: 本地有损将 gif 压缩为 webp
- imagemin-gif2webp:
- Auto Refresh TinyPng Key Across Months:
- yes: 检测到跨月(与上次使用时年月不同)则自动刷新 TinyPng API Key 的状态
- no: 不检测,但是仍然记录年月
Expand Down Expand Up @@ -113,39 +116,54 @@
</td>
<td>❌</td>
<td>
若有效 Key 达到使用次数,则不在访问<br>
若有效 Key 达到使用次数,则不再访问<br>
需要删除相应配置文件,才可重置
</td>
</tr>
<tr>
<th rowspan=1>imagemin</th>
<th rowspan=3>imagemin</th>
<td>✅</td>
<td>支持本地有损转换</td>
<td>
<b>mozjpeg</b>:<br>
支持本地有损压缩
</td>
<td>✅</td>
<td>支持本地有损转换</td>
<td>
<b>mozjpeg</b>:<br>
支持本地有损压缩
</td>
</tr>
<tr>
<th rowspan=2>imagemin2webp</th>
<td>✅</td>
<td>支持本地有损转换</td>
<td>
<b>imagemin-webp</b>:<br>
支持本地有损转换为 <b>webp</b>
</td>
<td>✅</td>
<td>支持本地有损转换</td>
<td>
<b>imagemin-webp</b>:<br>
支持本地有损转换为 <b>webp</b>
</td>
</tr>
<tr>
<td>✅</td>
<td>支持 gif 转 webp</td>
<td>
<b>imagemin-gif2webp</b>:<br>
支持 <b>gif</b> 本地有损转换为 <b>webp</b>
</td>
<td>❌</td>
<td>不支持 gif 转 webp</td>
</tr>
<tr>
<th rowspan=1>webp-converter</th>
<th rowspan=2>webp-converter</th>
<td>✅</td>
<td>
jpeg, png, webp 压缩为 webp<br>
支持 gif 压缩为 webp
</td>
<td>❌</td>
<td>不支持使用 webp-converter</td>
<td>jpeg, png, webp 压缩为 <b>webp</b></td>
<td rowspan=2>❌</td>
<td rowspan=2>不支持使用 webp-converter</td>
</tr>
<tr>
<td>✅</td>
<td>支持 gif 压缩为 <b>webp</b></td>
</tr>
<!-- <tr>
<td>✅</td>
Expand All @@ -167,7 +185,9 @@
- [x] 刷新所有 `Key`
- [x] 跨越份自动刷新有效 `Key`
- [x] 加入 `webp-converter` (更小的体积和更快的速度)
- [ ] 加入 `gift 2 webp` 的能力 (imagemin2webp & webp-converter) (测试中)
- [ ] 加入 `gift 2 webp` 的能力
- [x] 使用 `webp-converter``gwebp`
- [ ] `imagemin-gif2webp`


# 报告问题
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "picgo-plugin-compress-next",
"version": "1.3.2",
"version": "1.4.0",
"description": "Image compression plugin for PicGo(>=^2.3.0). Update, adapt and optimize. Better support and richer features",
"main": "dist/index.js",
"type": "commonjs",
Expand Down Expand Up @@ -41,14 +41,14 @@
},
"dependencies": {
"@types/uuid": "^10.0.0",
"uuid": "^10.0.0",
"crypto-js": "^4.2.0",
"fs-extra": "^11.2.0",
"image-size": "^1.1.1",
"imagemin": "^7.0.1",
"imagemin-mozjpeg": "^8.0.0",
"imagemin-upng": "^2.0.3",
"imagemin-webp": "^6.1.0",
"uuid": "^10.0.0",
"webp-converter": "^2.3.3"
}
}

0 comments on commit 961f88a

Please sign in to comment.