ImageGallery block renders a responsive masonry-style or uniform grid of images with optional captions. It uses urlFor with LQIP placeholders for optimized lazy loading.
Props
Optional section heading rendered as
<h2>.Supporting text below the heading.
Array of image objects. Each item has:
image(SanityImageObject, required) — the image with hotspot/crop and LQIP metadatacaption(string) — optional caption displayed below the image
Number of columns in the grid. Defaults to
3.Usage in Sanity Studio
- Add an Image Gallery block to a page.
- Set an optional Heading and Description.
- Add images to the Images array — each requires an image upload and alt text.
- Set the Columns value in Layout Options.