-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[1.0] Ignore SVGs in gatsby-remark-responsive-image (#1145) #1157
[1.0] Ignore SVGs in gatsby-remark-responsive-image (#1145) #1157
Conversation
…and instead just copy them alongside GIFs in gatsby-remark-copy-linked-files.
Deploy preview ready! Built with commit 2606c3a |
Deploy preview failed. Built with commit 2606c3a https://app.netlify.com/sites/gatsbyjs/deploys/593f3ba26f4c50516af8a13f |
Deploy preview ready! Built with commit 2606c3a |
Ready to merge, fixes #1145 and GIFs getting copied as |
visit(markdownAST, `image`, image => { | ||
if (image.url.slice(-3) === `gif`) { | ||
const fileType = image.url.slice(-3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unnecessarily fragile code now that I think about it... we can just get the actual extension off linkNode
as we do above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got to sleep, but pushed something very redundant ;)
Thanks! |
…and instead just copy them alongside GIFs in gatsby-remark-copy-linked-files.
WIP, currently all SVGs get copied to
public
asundefined.svg
:D