woltapp/blurhash

Next js?

duveborg opened this issue ยท 5 comments

This library does not work with the placeholder of the nextJS 11 image component, right? https://nextjs.org/docs/api-reference/next/image

same question

Hello, I had the same problem. So, I've created a hook called use-next-blurhash. You just need to pass the blurhash code, and the hook returns you the URL to pass to the NextImage component.

Any feedback is welcome ๐Ÿ˜

Next.js would benefit from #56 (blurhash to base64 conversion).

This would work with the existing blurDataURL and remove the canvas dependency.

If you guys still need a decoder for NextJS that also works on the server side, I made my own that doesn't require a canvas dependency:
https://gist.github.com/mattiaz9/53cb67040fa135cb395b1d015a200aff

For this library to work with Next.js, you'd need to create a blurDataURL. There's solutions in #43.

Closing.