Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ErKeLost authored Dec 13, 2024
1 parent 8b46a9e commit 8bc5743
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- [ ] Supports rsbuild and farm frameworks

> [!WARNING]
Since Google [squoosh](https://github.com/GoogleChromeLabs/squoosh) no longer maintains the node direction, I fock came out and revised some compatibility issues. Details [squoosh-next](https://github.com/ErKeLost/squoosh-node-latest)
Since Google [squoosh](https://github.com/GoogleChromeLabs/squoosh) no longer maintains the node direction, This fock came out and revised some compatibility issues. Details [squoosh-next](https://github.com/ErKeLost/squoosh-node-latest)

### ✨✨ Continuous iterative development in testing

Expand All @@ -33,30 +33,18 @@ Since Google [squoosh](https://github.com/GoogleChromeLabs/squoosh) no longer ma
- 🦾 High Performance based on squoosh
- ✨ Multiple picture formats can be configured
- 🪐 Compress the code at build time
- 😃 Caching Mechanism Tips: TODO
- 😃 Caching Mechanism
- 🌈 You can convert different picture types at build time

## Squoosh && Sharp && Svgo
## Squoosh && Svgo

Unplugin-imagemin supports two compression modes

[Sharp](https://github.com/lovell/sharp) The typical use case for this high speed Node.js module is to convert large images in common formats to smaller, web-friendly JPEG, PNG, WebP, GIF and AVIF images of varying dimensions.

[Squoosh](https://github.com/GoogleChromeLabs/squoosh) is an image compression web app that reduces image sizes through numerous formats.
**Squoosh** with rust & wasm

[Svgo](https://github.com/svg/svgo) Support compression of pictures in svg format

## ✨Warning

Although squoosh has done a good job, there will be all kinds of problems in future node versions, so don't use squoosh mode for the time being.

Due to the loading problem of `squoosh`, unplugin-imagmin currently only supports versions below node 18.

Due to the rapid update of vite version and squoosh stop maintenance and other unstable factors

It is recommended that mode choose `sharp`.

## 🍰 Effect display

https://github.com/unplugin/unplugin-imagemin/assets/66500121/49169b22-7f5b-4cdc-b023-302003b15522
Expand Down Expand Up @@ -127,7 +115,7 @@ export default defineConfig({

## 🌸 DefaultConfiguration

Squoosh DefaultConfiguration and sharp DefaultConfiguration
Squoosh DefaultConfiguration

DefaultConfiguration see [DefaultConfiguration](https://github.com/ErKeLost/unplugin-imagemin/blob/main/src/core/compressOptions.ts)

Expand Down

0 comments on commit 8bc5743

Please sign in to comment.