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

Traced SVG for gatsby-remark-images #4624

Closed
vojtechruz opened this issue Mar 20, 2018 · 5 comments
Closed

Traced SVG for gatsby-remark-images #4624

vojtechruz opened this issue Mar 20, 2018 · 5 comments

Comments

@vojtechruz
Copy link
Contributor

I am using Traced SVG option from gatsby-image for my non-article images and I love it.

However for my markdown images, there is only available blur-up effect, which means image loading is inconsistent. It would be nice to have traced svg also for gatsby-remark-images.

@pieh
Copy link
Contributor

pieh commented Mar 20, 2018

Hey @vojtechruz , You can create PR adding support for more options to markdown images. Relevant code is here - https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-remark-images/src/index.js

@humphreybc
Copy link
Contributor

@pieh If you could explain the required changes at a high level, that would be quite helpful. Then I could take a stab at this. I looked at the source for gatsby-image to see how traced SVGs are done there, and it seems to call image.tracedSVG, which comes from the Sharp processing library via gatsby-transformer-sharp, I think. Hopefully it's as simple as that for gatsby-remark-images. Would love to get some more detail from you.

@pieh
Copy link
Contributor

pieh commented May 6, 2018

@humphreybc In addition to importing and using sizes function from gatsby-plugin-sharp You would need to import traceSVG function, call it and adjust returned rawHTML to make use of result of traceSVG function.

@KyleAMathews
Copy link
Contributor

Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help!

@hackhat
Copy link

hackhat commented Oct 26, 2018

Hi there, any news about this?

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

5 participants