Unsplash is my favorite image site, not only for it’s huge amount of free images but also for it’s great user-experience. It has already been quite a while since Unsplash started using BlurHash to delivery progressive Image Loading experience.
Progressive Image Loading makes better user experience. But what is Progressive Image Loading?
Instead of waiting for the final image to be rendered, use a low-quality image as placeholder (LQIP) first, swith to the original one when it’s loaded.
What is going on?
div
for example) with specific aspect-ratio
, usually the same as the original image⬅️ This 8 × 8 px image can be scaled up many times (865 × 649 px on my screen for example) without increasing noticable noises.
blur_hash
field of a list itemimage/bmp
image, rendered as image placeholderSee Size Comparison. When canvas width is below 20px, image/png
and image/bmp
has almost the same size in comparison.
I created a web app (Image Blurrer) to generate blurry placeholder image. 4 types of output image supported:
In my personal usage and test, StackBlur is my favorite.
Test Image: https://assets.lynan.cn/uPic/progress-image-loading-test-img.jpg
width(px) | jpeg | png | bmp |
---|---|---|---|
4 | 132 B | 90 B | 90 B |
6 | 168 B | 135 B | 135 B |
8 | 225 B | 198 B | 198 B |
10 | 276 B | 279 B | 279 B |
12 | 363 B | 378 B | 378 B |
14 | 423 B | 495 B | 495 B |
16 | 543 B | 630 B | 630 B |
18 | 618 B | 783 B | 783 B |
20 | 765 B | 954 B | 954 B |
22 | 831 B | 1.1 KiB | 1.1 KiB |
24 | 1008 B | 1.3 KiB | 1.3 KiB |
26 | 1.1 KiB | 1.5 KiB | 1.5 KiB |
28 | 1.3 KiB | 1.8 KiB | 1.8 KiB |
30 | 1.4 KiB | 2.0 KiB | 2.0 KiB |
32 | 1.6 KiB | 2.3 KiB | 2.3 KiB |