
export default {
  name: 'imagesTest',
  type: 'object',
  title: 'Images test',
  preview: {
    select: {
      title: 'title',
      imageUrl: 'mainImage.asset.url',
    },
  },
  fields: [
    {
      name: 'title',
      title: 'Title',
      type: 'string'
    },
    {
      name: 'imageGalleryInGrid',
      title: 'Image Gallery',
      description: 'An array of images. options: {layout: "grid"}',
      type: 'array',
      options: {
        layout: 'grid'
      },
      of: [
        {
          name: 'myImage',
          title: 'My Image',
          type: 'myImage'
        }
      ]
    },
    {
      name: 'imageGallery',
      title: 'Image gallery (sortable, not grid)',
      type: 'array',
      options: {
        sortable: true,
        layout: 'grid'
      },
      of: [
        {
          title: 'Image',
          type: 'image',
          preview: {
            select: {
              imageUrl: 'asset.url',
              title: 'caption'
            }
          },
          fields: [
            {
              name: 'caption',
              type: 'string',
              title: 'Caption',
              options: {
                isHighlighted: true
              }
            }
          ]
        }
      ]
    },
    {
      name: 'mainImage',
      title: 'Main image',
      type: 'image',
      options: {
        hotspot: true
      },
      fields: [
        {
          name: 'caption',
          type: 'string',
          title: 'Caption'
        }
      ]
    },
    {
      name: 'myImage',
      title: 'My Image',
      type: 'myImage',
      required: true,
      readOnly: true
    },
    {
      name: 'pngImage',
      title: 'PNG image',
      type: 'image',
      options: {
        hotspot: true,
        accept: 'image/png'
      }
    }
  ]
}

@@ -668,26 +668,606 @@
 ry (
-sortable, not grid
+with defaults)',%0A      type: 'array',%0A      of: %5B%0A        %7B%0A          title: 'Image',%0A          type: 'image',%0A          preview: %7B%0A            select: %7B%0A              imageUrl: 'asset.url',%0A              title: 'caption'%0A            %7D%0A          %7D,%0A          fields: %5B%0A            %7B%0A              name: 'caption',%0A              type: 'string',%0A              title: 'Caption',%0A              options: %7B%0A                isHighlighted: true%0A              %7D%0A            %7D%0A          %5D%0A        %7D%0A      %5D%0A    %7D,%0A    %7B%0A      name: 'imageGalleryNotSortable',%0A      title: 'Image gallery (Grid, *not* sortable
 )',%0A
@@ -1322,19 +1322,20 @@
 rtable: 
-tru
+fals
 e,%0A     

Add example of image grid, not sortable