You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
None of the versions of this library are working so here's a quick replacement as I couldn't find any, I made my own but I don't have the time to turn it into a library I put my code here and anyone can make it into a library or maybe this repo adapts it.
Same problem here. The proposed solution probably works, but I didn't want to fiddle with modifying the package, so I ended up using this package: https://github.com/mcnaveen/blurhash-base64
None of the versions of this library are working so here's a quick replacement as I couldn't find any, I made my own but I don't have the time to turn it into a library I put my code here and anyone can make it into a library or maybe this repo adapts it.
How to make it work
All credits of the functionality goes to https://gist.github.com/mattiaz9 I was only able to make this work thanks to his function at:
https://gist.github.com/mattiaz9/53cb67040fa135cb395b1d015a200aff
blurHashToDataURL.ts
ImageHash.tsx
Install
blurhash
using npm|yarn|bun.Usage example
Not that ImageHash's syntax is exactly the same as Image component from nextjs it just adds one new prop:
blurhash
pass your blurhash and you're done.The text was updated successfully, but these errors were encountered: