Skip to main content
100%

Low Quality Image Placeholders out of the box in sanity.io

✓ Published0🌍 Public
Aachanda101
Last edited Nov 22, 2020
Created on Nov 22, 2020

A React app demonstrates how Sanity.io provides low-quality image placeholders (LQIP) out of the box. It fetches posts with `mainImage` assets from a Sanity project using the `@sanity/client` API, then renders each image with its LQIP as a blurred background while the full-resolution image fades in after a 2-second delay. The layout uses CSS flexbox and an aspect-ratio calculation from the image metadata to maintain proportions during loading.

AI-generated description

Similar vizzes