Netlify-cms: Select multiple images

Created on 12 Feb 2020  路  4Comments  路  Source: netlify/netlify-cms

Describe the bug
Hi there, no matter how I configure the CMS, I am not able to select multiple images in the images widget. As you can see in my config I have tried allow_multiple as well as passing a config to the media library (which is only necessary if I use a third party media library?)

To Reproduce

  1. create a new post
  2. select media
  3. media browser opens
  4. i click the first media and it's selected
  5. i click the second media, it's selected and the first is deselected

Expected behavior
I expected to be able to select multiple images or some kind of button to enable this.

Applicable Versions:

  • Netlify CMS version: 2.10.20
  • Git provider: Github
  • OS: Mac
  • Browser version Chrome 80
  • Node.JS version: 13.6.0

CMS configuration

media_folder: example/data/media
public_folder: /media

collections:
  - label: "Settings"
    name: "settings"
    editor:
      preview: false
    files:
      - label: "Feed"
        name: "feed"
        file: "example/data/settings/feed.yml"
        fields:
          - {label: Name, name: name, widget: string}
          - {label: Username, name: username, widget: string}
          - {label: Description, name: description, widget: text}
          - {label: Website, name: website, widget: string}
          - {label: Avatar, name: avatar, widget: image}
  - name: "post"
    label: "Posts"
    label_singular: "Post"
    folder: "example/data/posts"
    create: true
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    editor:
      preview: false
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - label: "Media"
        name: "media"
        widget: "image"
        allow_multiple: true
        media_library:
          config:
            multiple: true
      - { label: "Location", name: "location", type: "Point", widget: "map", required: false }
      - { label: "Body", name: "body", widget: "text", required: false }

Most helpful comment

Just because it took me way to long to figure this out:
While a bit tedious you can add multiple images to a file/entity by using a list-widget.
Maybe it helps someone 馃槃

All 4 comments

To get multiple image support you'll need to use an external media library like https://www.netlifycms.org/docs/cloudinary/

We might need to re-phrase:
image

As it doesn't make it very clear.

Also https://github.com/netlify/netlify-cms/issues/2243

Oh I saw that one but I thought it would be supported by filesystem for sure.. (why doesn't it?)

Anyway! Thanks and closing, now I know at least what the problem is 馃憤

Oh I saw that one but I thought it would be supported by filesystem for sure.. (why doesn't it?)

Anyway! Thanks and closing, now I know at least what the problem is 馃憤

The challenge is to have the UI to handle file/image uploads. As described in #2243 we should really use an external package for it.

Just because it took me way to long to figure this out:
While a bit tedious you can add multiple images to a file/entity by using a list-widget.
Maybe it helps someone 馃槃

Was this page helpful?
0 / 5 - 0 ratings