Joint session with Vercel: How to build intelligent storefronts (May 15th)

How to upload multiple images at once in Sanity

6 repliesLast updated: Nov 29, 2025

Is there a way to model so that I can upload multiple images at once?
AI Update

Yes, you can definitely model multiple images by using an array field with the image type. This allows content editors to upload and manage multiple images in a single field.

Here's how to set it up in your schema:

{
  name: 'gallery',
  title: 'Image Gallery',
  type: 'array',
  of: [
    {
      type: 'image',
      options: {
        hotspot: true
      },
      fields: [
        {
          name: 'alt',
          type: 'string',
          title: 'Alternative text',
        },
        {
          name: 'caption',
          type: 'string',
          title: 'Caption',
        }
      ]
    }
  ]
}

This creates an orderable array where editors can:

The array automatically assigns a unique _key to each image, which helps track items across changes. You can also take advantage of Sanity's copy/paste functionality to duplicate entire arrays or individual images between documents.

If you need to store additional metadata like color palette or EXIF data, you can add the metadata option to extract that information automatically:

{
  type: 'image',
  options: {
    hotspot: true,
    metadata: ['blurhash', 'lqip', 'palette', 'exif']
  }
}

This approach gives you a flexible, structured way to manage multiple images while maintaining all the benefits of Sanity's asset management system.

Show original thread
6 replies

Was this answer helpful?

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Related contributions