sanity-plugin-media
sanity-plugin-media copied to clipboard
Feature Request: Upload multiple images in an array
Hi, I have a feature request about uploading multiple images in an array. This can happen which a drag and drop or selecting the images with either mouse or clicking a tag. It would be a nice addition that can contribute a much faster workflow on sanity.
Thank you so much for your work!
Hey @mikepziegler – if I understand you correctly, I believe this is already possible in Sanity when working with arrays of images. e.g.
// Your document schema
// You can drag and drop multiple images into this array input, and they'll upload as you expect!
...
{
name: "images",
title: "An array of images",
type: "array",
of: [
{
type: "image",
},
],
},
...
However, I don't believe it's possible when dealing with arrays of objects (that contain their own nested fields), and that is more of a studio concern.
Does this issue sound like what you're looking for? If not, would appreciate further clarity here – thanks!
Hi, I have the same question about array of images: I saw that I can upload multiple images dragging them to my array field directly but if I had previously uploaded my images how can I select all of them from the selection screen?
If I click "add an item" and then I choose to select my image through the media plugin, I can select one image only.
Thanks 🙏🏻
Ok, I didnt know about drag and dropping into the Add Items button. I've tested it and it seems that you can only upload maximum 5 pictures simultaniously.
What I want to add (I forgot to put it in the description) is to select multiple pictures in the media library and add it to the post.
Did @valse or @mikepziegler find a way to do this (select multiple images from the media library to add to the array)?
I also wonder why this is not possible since it is shown in the README right at the top. When opening the media plugin I can only click one image and it selects that image and closes the media plugin right after...
My field definition is simple...
defineField({
name: 'images',
type: 'array',
of: [{ type: 'image' }]
})