Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Squoosh with Sharp for image optimization #751

Closed
donmccurdy opened this issue Dec 19, 2022 · 3 comments · Fixed by #752
Closed

Replace Squoosh with Sharp for image optimization #751

donmccurdy opened this issue Dec 19, 2022 · 3 comments · Fixed by #752
Labels
feature New enhancement or request package:cli
Milestone

Comments

@donmccurdy
Copy link
Owner

donmccurdy commented Dec 19, 2022

I've been using squoosh for webp, jpeg, and png optimization since those features were added. It supports only Node.js today, and only versions <18, but the hope originally was that Squoosh would add in-browser support and maybe eventually Basis compression. I no longer think either of those things will happen, and since Squoosh seems to be unmaintained (causing errors in latest Node.js LTS), it's time to switch.

The library will begin using Sharp (https://sharp.pixelplumbing.com/) for these operations instead, unless I find something better. Being able to support these features on the web would be great, but I don't see a maintained alternative for it, short of forking Squoosh.

This might also be a good time to update the image resizing code, or provide an alternative.

Related issues:

@donmccurdy donmccurdy added feature New enhancement or request package:cli labels Dec 19, 2022
@donmccurdy donmccurdy added this to the v2.4 milestone Dec 19, 2022
@donmccurdy
Copy link
Owner Author

@hybridherbst
Copy link

Maintenance for the Squoosh CLI and libsquoosh has officially ended now:
GoogleChromeLabs/squoosh#1181 (comment)

@donmccurdy
Copy link
Owner Author

One bit of good news is that Sharp uses libvips as its image processing engine, and there is an unofficial WASM build that works on web, excluding Safari. Probably too early to pull that WASM build in here, but maybe possible to support running things on the web down the road this way too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New enhancement or request package:cli
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants