Uploading multiple images in Sanity.io using drag and drop

6 replies
Last updated: Jul 23, 2020
Is there a way to model so that I can upload multiple images at once?
Jul 23, 2020, 8:01 PM
If you make an array of images, you can drag'n'drop multiple images onto it.
{
  name: 'gallery',
  type: 'array',
  of: [
    { type: 'image' }
  ],
  options: {
    layout: 'grid'
  }
}

Jul 23, 2020, 8:13 PM
Better UX for batch-uploading is on the roadmap 🙂
Jul 23, 2020, 8:14 PM
If you make an array of images, you can drag'n'drop multiple images onto it.
{
  name: 'gallery',
  type: 'array',
  of: [
    { type: 'image' }
  ],
  options: {
    layout: 'grid'
  }
}

Jul 23, 2020, 8:13 PM
Thanks
Knut Melvær
. I couldn’t figure out where to drag’n drop. Finally got it, thanks!
Jul 23, 2020, 8:57 PM
can’t wait to see the UX improvements 😉
Jul 23, 2020, 8:57 PM
me too 🙂
Jul 23, 2020, 9:01 PM

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.

Was this answer helpful?