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

[1.0] Ignore SVGs in gatsby-remark-responsive-image (#1145) #1157

Merged

Conversation

fk
Copy link
Contributor

@fk fk commented Jun 12, 2017

…and instead just copy them alongside GIFs in gatsby-remark-copy-linked-files.

WIP, currently all SVGs get copied to public as undefined.svg :D

…and instead just copy them alongside GIFs in gatsby-remark-copy-linked-files.
@fk fk changed the title Ignore SVGs in gatsby-remark-responsive-image (#1145) Jun 12, 2017
@gatsbybot
Copy link
Collaborator

gatsbybot commented Jun 12, 2017

Deploy preview ready!

Built with commit 2606c3a

https://deploy-preview-1157--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

gatsbybot commented Jun 12, 2017

@gatsbybot
Copy link
Collaborator

gatsbybot commented Jun 12, 2017

Deploy preview ready!

Built with commit 2606c3a

https://deploy-preview-1157--gatsbygram.netlify.com

@fk
Copy link
Contributor Author

fk commented Jun 13, 2017

Ready to merge, fixes #1145 and GIFs getting copied as undefined.gif.

visit(markdownAST, `image`, image => {
if (image.url.slice(-3) === `gif`) {
const fileType = image.url.slice(-3)
Copy link
Contributor

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.

Copy link
Contributor Author

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 ;)

@KyleAMathews KyleAMathews merged commit 51bdc9d into gatsbyjs:1.0 Jun 13, 2017
@KyleAMathews
Copy link
Contributor

Thanks!

@fk fk deleted the 1145-gatsby-remark-responsive-image-exclude-svgs branch June 20, 2017 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants