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 source images in layouts/* #6060

Closed
cgpro opened this issue Jun 21, 2018 · 1 comment
Closed

How to source images in layouts/* #6060

cgpro opened this issue Jun 21, 2018 · 1 comment

Comments

@cgpro
Copy link

cgpro commented Jun 21, 2018

I tried to import an image from src/pages/ in my src/layouts/index.js. Its a in a static footer section.

import mypic from '../pages/img/mypic.png' results in undefined (with {console.log(mypic)}. In the pages/* templates it works perfectly, why not in src/layouts/?

Maybe somebody can push me in the right direction. :-)

@cgpro
Copy link
Author

cgpro commented Jun 21, 2018

My fault... const Layout = ({ children, data, mypic }) is not working ;-)

@cgpro cgpro closed this as completed Jun 21, 2018
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

1 participant