Notes

Blur-up image loading with next/image

November 13, 2020
ยท
1 min read
I wanted to implement Medium's progressive image loading technique with Next.js's new
next/image
component. It doesn't pass the image dimensions, not as intuitive as gatsby.
Found a way to make it work for article images and book covers. Using next-placeholder to get
blurhash
during the build time, then passing it to blurhash.
Unfortunately non-meta images are still lacking this feature. Generating a map of blurhashes of each local image could be a solution. It's a bit ugly though.