-
Notifications
You must be signed in to change notification settings - Fork 37
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
Static assets not prefixed #13
Comments
I don't think the static folder needs to be processed unless there are HTML or JS files there referencing images to the same static folder. The issue is that some static files, such as images, are being referenced within the // https://www.gatsbyjs.org/docs/static-folder/#referencing-your-static-asset
render() {
// Note: this is an escape hatch and should be used sparingly!
// Normally we recommend using `import` for getting asset URLs
// as described in the “Importing Assets Directly Into Files” page.
return <img src={'logo.png'} alt="Logo" />;
} How can this plugin detect and parse these scenarios reliably without false positives? With |
Feel free to close this then. I had installed it on a starter that must have been using the escape hatch. |
@i001962 While it's an escape hatch, there are valid use cases for it. I would be better to have a solution when we need this, even if it's just a note in the README asking them to prefix with |
@satazor ok will do but please confirm that something like this is what you are suggesting:
|
Yep that’s it, I think you are missing a trailing slash. |
@satazor that's why I was asking. 😆 |
@i001962 did the workaround solve the issue? Since you made a PR adding a note to the readme, I suppose it did? |
Turns out static assets were not the issue. I will close this issue now as I have restated the issue in issue #14 |
Looks like static images aren't getting prefixed.
Could it be as simple as adding static directory to gatsby-node.js line 74
The text was updated successfully, but these errors were encountered: