0

Hi I'm new to Netlify CMS I just learned about it from a blog

so I have config.yml that creates two input fields in Netlify CMS enter image description here Sample:

collections:
  - name: 'team'
    label: 'Team'
    folder: 'src/team'
    create: true
    slug: '{{slug}}'
    fields:
      - { label: 'Team Member', name: 'title', widget: 'string' }
      - { label: 'Bio', name: 'bio', widget: 'markdown' }

I'm just wondering how can I add input field for the image

Thanks!

ksav
  • 20,015
  • 6
  • 46
  • 66

1 Answers1

0

Just add

{ label: "Image", name: "thumbnail", widget: "image"}

into one of your fields

collections:
  - name: 'team'
    label: 'Team'
    folder: 'src/team'
    create: true
    slug: '{{slug}}'
    fields:
      - { label: 'Team Member', name: 'title', widget: 'string' }
      - { label: 'Bio', name: 'bio', widget: 'markdown' }
      - { label: "Image", name: "thumbnail", widget: "image"}

Source: https://www.netlifycms.org/docs/add-to-your-site/

Gilbert lucas
  • 519
  • 7
  • 22