2 ms·
I open sourced a version of what Evan calls the "webp potato hash" awhile back: https://github.com/transitive-bullshit/lqip-modern https://github.com/transitive
by transitivebs 4y ago
I open sourced a version of what Evan calls the "webp potato hash" awhile back: https://github.com/transitive-bullshit/lqip-modern https://github.com/transitive-bullshit/lqip-modern
I generally prefer using webp to BlurHash or this version of ThumbHash because it's natively supported and decoded by browsers – as opposed to requiring custom decoding logic which will generally lock up the main thread.
- eyelidlessness 4y agoFWIW, it can almost certainly be moved off the main thread with OffscreenCanvas, but that has its own set of added complexities. Edit: word wires got crossed in my brain
- kurtextrem 4y agoSmall heads-up, you might want to look at the PRs (I've opened the single open PR) :D Take a look here: https://github.com/ascorbic/unpic-placeholder https://github.com/ascorbic/unpic-placeholder. Recently created by a Principal Engineer of Netlify, which kind of server-side-renders BlurHash images, so that they don't tax the mainthread. Maybe the same can be done for ThumbHash (I've opened an issue in that repo to discuss it)