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

Images broken in MDX file when passing <img /> through a React Component #42

Open
MaggieAppleton opened this issue Jan 1, 2020 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@MaggieAppleton
Copy link
Contributor

MaggieAppleton commented Jan 1, 2020

On the /secret-sandwich branch I'm working on a post written in MDX, that includes a React component.

The component is a <LinkCard /> that takes a title, url, and an image as props.

The images I want to add to the cards are in the same folder as the MDX file. When I try to pass them as <LinkCard img="./ety.png" /> they show up broken.

TLDR; How do you pass an image url into a React Component within an MDX file?

Broken images:
Screenshot 2020-01-01 at 08 24 52

Component in the MDX file:
Screenshot 2020-01-01 at 08 25 40

@MaggieAppleton MaggieAppleton added bug Something isn't working help wanted Extra attention is needed labels Jan 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant