ivansevillaa / use-next-blurhash

A custom hook that from a blurhash string will give you a blurDataUrl to add to your dynamics image in nextjs getting so a better user experience.
MIT License
78 stars 6 forks source link

Use fast-blurhash decoder #13

Closed gretchenfitze closed 1 year ago

gretchenfitze commented 1 year ago

Hi! Thanks for that package! I found out there exists a faster optimized implementation for blurhash decoder: fast-blurhash. I think it would be great to use it here

dukesx commented 1 year ago

I am using it r.n in my project with "modified" use-next-blur-hash and see maybe 20 to 40% speed on higher resolution hashes, depending on how high you take. My Max goes upto 32px on both width and height. Below 20px, no noticeable improvements.

ivansevillaa commented 1 year ago

@gretchenfitze Thanks a lot for the contribution! ❤️