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

Release a Jpegli WASM build #3454

Open
xfalcox opened this issue Apr 3, 2024 · 0 comments
Open

Release a Jpegli WASM build #3454

xfalcox opened this issue Apr 3, 2024 · 0 comments
Labels
jpegli Related to jpegli, also cjpegli and djpegli unrelated to 1.0 Things that need not be done before the 1.0 version milestone wasm

Comments

@xfalcox
Copy link

xfalcox commented Apr 3, 2024

Is your feature request related to a problem? Please describe.
In @discourse we added a WASM version of MozJPEG, that is used to re-encode uploads in the user device before the actual upload to make uploads faster and save user bandwidth. You can read about it over https://blog.discourse.org/2021/07/faster-user-uploads-on-discourse-with-rust-webassembly-and-mozjpeg/.

This was heavily inspired by the work done at https://github.com/GoogleChromeLabs/squoosh, which ships many image codecs as WASM, like MozJPEG and JXL itself.

Since Jpegli provides better compression, I'd love to swap to this, provided we can get a WASM build of it's encoder that accepts a RGBA array as input.

Describe the solution you'd like
The project provides WASM files of it's releases, or documents a way for downstream projects to build it themselves.

Optionally, publish said package in NPM.

Describe alternatives you've considered

  • Build it myself. Hard to justify the time investment given the unfamiliarity with this stack and that existing MozJPEG still works.

  • Wait for squoosh project to add it. Looks like squoosh is in maintenance mode, as key people left the company.

Additional context
Discourse is OSS, and widely used. Compressing images from user uploads in forums have a huge impact as those images are downloaded many times over decades after they are uploaded due to the open nature of forums on the internet.

Also, I was asked to open this issue at https://twitter.com/jyzg/status/1775590308585034090

@mo271 mo271 added wasm jpegli Related to jpegli, also cjpegli and djpegli unrelated to 1.0 Things that need not be done before the 1.0 version milestone labels Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jpegli Related to jpegli, also cjpegli and djpegli unrelated to 1.0 Things that need not be done before the 1.0 version milestone wasm
Projects
None yet
Development

No branches or pull requests

2 participants