I really like Squoosh... I'm not sure if they have yet, but there was at one time discussion of separating the builds for the underlying wasm built libraries from squoosh whole, which would make it more usable for separate projects.
It also does make sense for you to pick and choose only the compression codecs you will need. Otherwise the cost of making every client download huge and unused wasm libraries might outweigh any bandwidth savings from compression.
browsers need to have an API to access the underlying libraries. No reason I shouldn't be able to use turbojpeg or libpng clientside. Can't even do it in WebAssembly, because simd was an afterthought.
13 comments
[ 1.6 ms ] story [ 41.2 ms ] thread// 8 Lines not including sarcastic comments obviously.
Image-conversion is the library I've used the most, since you can target file-size || quality:
https://github.com/WangYuLue/image-conversion
Oh wait. It's a redirect to StackOverflow?!
https://stackoverflow.com/questions/23945494/use-html5-to-re...
There are far more knobs you can tune whereas the native browser conversion only has mimetype and quality (via toBlob: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasE...)
It also does make sense for you to pick and choose only the compression codecs you will need. Otherwise the cost of making every client download huge and unused wasm libraries might outweigh any bandwidth savings from compression.
https://raw.githubusercontent.com/brunobar79/J-I-C/master/sr...