-
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
[gatsby-image] color of tracedSVG using Contentful fragments #14245
Comments
@yesh could you provide a reproduction? In general, my guess is that presuming there are images they may be associated with a query projectQuery($title: String!) {
contentfulProject(title: {
eq: $title
}) {
images {
localFile {
fluid(
maxWidth: 600,
quality: 95
) {
...GatsbyContentfulFluid_tracedSVG
}
}
}
}
} It also looks like you've forgotten to pass the My advice would be to check out |
hi @DSchau, I don't think this is an issue or a gatsby bug, I posted this as a question/help. the first example is something I found digging around in docs and discussion, and afaik it works. without the so my question is if there's a documentation for contentful fragments and how to pass the traceSvg options in this case. thanks! |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing! Thanks for being a part of the Gatsby community! 💪💜 |
I came across this same error today when trying to set color in
Link to repo: https://github.com/janczizikow/contentful-svg-fragment I'm not sure if using tracedSVG on |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing! Thanks again for being part of the Gatsby community! |
I'm also having the same issue. Tried installing gatsby-plugin-sharp to see if it would help but no joy. |
As Google took me here, for those migrating to
export const bannerImage = graphql`fragment bannerImage260 on File {
childImageSharp {
gatsbyImageData(
width: 260
tracedSVGOptions: {color: "#FFC600"}
quality: 50
placeholder: TRACED_SVG
layout: CONSTRAINED
)
}
} |
Hi,
I am trying to change the color of the tracedSVG of images from Contentful using
gatsby-image
.Summary
digging in the docs and around the web I found that you can put a
traceSVG
argument with various options in a graphql query, like this:traceSVG: { background: "#fbfafc", color: "#dbd4e2" }
like in this example:
but this method is not working for my case, because I use a ContentfulAsset type field, like this:
in fact, if I try to use the option
traceSVG
inside the fluid arguments i get this error:does someone know if there is another way to define the background and trace colors of a tracedSVG in a ContentfulAsset?
thanks for your help!
The text was updated successfully, but these errors were encountered: