gatsby: Unable to use array of paths with gatsby-remark-images and gatsby-plugin-netlify-cms-paths

Everything is hooked up correctly so I can do this in my markdown files:

image: /uploads/image.png

And then in my graphql query I can query the image like so:

image {
 childImageSharp {
  sizes(maxWidth: 1000, quality: 100) { 
   ...GatsbyImageSharpSizes
  } 
 }
}

This all above works just fine, but when I try to do multiple paths like in an array it does not work.

images: 
 - /uploads/image1.png
 - /uploads/image2.png

I just get the strings and no paths returned. Is this not possible or am I doing this incorrectly ?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 20 (8 by maintainers)

Most upvoted comments

Hi,

i have some md templates with something similar, here is my graphql query

photos {
          childImageSharp{
            fluid(maxWidth: 1200, quality: 100) {
              ...GatsbyImageSharpFluid
            }
          }
        },

and in .md

photos: ['one.png', 'second.jpg']

This works for me so it should be working for you as well.