Image optimization in plain React

Hello, is there any opportunity to have image optimization libraries for React JS like Next/Image?
3 Replies
dys 🐙
dys 🐙10mo ago
sharp is what next/image uses. You might look at the Optimal section & search for “wasm program name” for the utilities used for image optimization. How would it work though? Next.js creates multiple versions of an image & only sends one to the client. If the image optimization were on the client, it has to get the original file to operate on, and at that point you've paid the bandwidth cost. There doesn't seem to be much gained by optimizing it.
elmcrest
elmcrest10mo ago
maybe something like this https://silvia-odwyer.github.io/photon/ ... looks interesting to me
Photon: A high-performance WebAssembly image processing library.
A WebAssembly image processing library that delivers blazing performance and can be called via JS.
elmcrest
elmcrest10mo ago
yeah, if you're trying to optimize for bandwidth this doesn't make sense of course
Want results from more Discord servers?
Add your server