Skip to content

Commit 79cfdda

Browse files
authored
Fix tracedSVG fragment support in Gatsby 2.0
Initial tracedSVG support did not include fragments for gatsby-image in 2.0, which uses Fixed and Fluid instead of Resolutions and Sizes. Add support for these new fragments.
1 parent 7ed8da9 commit 79cfdda

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

packages/gatsby-source-contentful/src/fragments.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ export const contentfulAssetFixed = graphql`
1010
}
1111
`
1212

13+
export const contentfulAssetFixedTracedSVG = graphql`
14+
fragment GatsbyContentfulFixed_tracedSVG on ContentfulFixed {
15+
tracedSVG
16+
width
17+
height
18+
src
19+
srcSet
20+
}
21+
`
22+
1323
export const contentfulAssetFixedNoBase64 = graphql`
1424
fragment GatsbyContentfulFixed_noBase64 on ContentfulFixed {
1525
width
@@ -52,6 +62,16 @@ export const contentfulAssetFluid = graphql`
5262
}
5363
`
5464

65+
export const contentfulAssetFluidTracedSVG = graphql`
66+
fragment GatsbyContentfulFluid_tracedSVG on ContentfulFluid {
67+
tracedSVG
68+
aspectRatio
69+
src
70+
srcSet
71+
sizes
72+
}
73+
`
74+
5575
export const contentfulAssetFluidNoBase64 = graphql`
5676
fragment GatsbyContentfulFluid_noBase64 on ContentfulFluid {
5777
aspectRatio

0 commit comments

Comments
 (0)