Skip to content

Can't .map with StaticImage #31760

Answered by LekoArts
pmarxbraun asked this question in Help
Jun 3, 2021 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

You can't use that syntax as it's currently not supported. For mapping over the images you'd need to query them with GraphQL and use <GatsbyImage />.

One could (probably) implement this by sending in a PR to https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-image/src/babel-plugin-parse-static-images.ts

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Mario8419
Comment options

@Mario8419
Comment options

@Histamina
Comment options

Answer selected by LekoArts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
topic: media Related to gatsby-plugin-image, or general image/media processing topics
4 participants
Converted from issue

This discussion was converted from issue #31743 on June 04, 2021 06:09.