Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set a image for list of posts? #1819

Closed
GoreStarry opened this issue Aug 15, 2017 · 1 comment
Closed

How to set a image for list of posts? #1819

GoreStarry opened this issue Aug 15, 2017 · 1 comment

Comments

@GoreStarry
Copy link
Contributor

I'm using the gatsby-transformer-javascript-static-exports to query the posts list.

export const data = {
  title: 'Book1',
  date: '2017-10-04',
  cover: require('./images/img.jpg'),
}

but when I query the JsFrontmatter the value of cover will be null.
And the image required by the component will be hashed, so it can't give value by image file name directly.
Is any way to make this work? THX!

@jbolda
Copy link
Contributor

jbolda commented Aug 18, 2017

Were you able to solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants