forked from prismicio/prismic-gatsby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfragments.js
93 lines (85 loc) · 2 KB
/
fragments.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import { graphql } from 'gatsby'
export const GatsbyPrismicImageFixed = graphql`
fragment GatsbyPrismicImageFixed on PrismicImageFixedType {
base64
width
height
src
srcSet
}
`
export const GatsbyPrismicImageFixed_noBase64 = graphql`
fragment GatsbyPrismicImageFixed_noBase64 on PrismicImageFixedType {
width
height
src
srcSet
}
`
// Not actually necessary since applying `auto=format` to the source URL
// automatically returns WebP for all URLs.
export const GatsbyPrismicImageFixed_withWebp = graphql`
fragment GatsbyPrismicImageFixed_withWebp on PrismicImageFixedType {
base64
width
height
src
srcSet
srcWebp
srcSetWebp
}
`
// Not actually necessary since applying `auto=format` to the source URL
// automatically returns WebP for all URLs.
export const GatsbyPrismicImageFixed_withWebp_noBase64 = graphql`
fragment GatsbyPrismicImageFixed_withWebp_noBase64 on PrismicImageFixedType {
width
height
src
srcSet
srcWebp
srcSetWebp
}
`
export const GatsbyPrismicImageFluid = graphql`
fragment GatsbyPrismicImageFluid on PrismicImageFluidType {
base64
aspectRatio
src
srcSet
sizes
}
`
export const GatsbyPrismicImageFluid_noBase64 = graphql`
fragment GatsbyPrismicImageFluid_noBase64 on PrismicImageFluidType {
aspectRatio
src
srcSet
sizes
}
`
// Not actually necessary - since Imgix is scaling,
// there is no "penalty" for including WebP by default
export const GatsbyPrismicImageFluid_withWebp = graphql`
fragment GatsbyPrismicImageFluid_withWebp on PrismicImageFluidType {
base64
aspectRatio
src
srcSet
srcWebp
srcSetWebp
sizes
}
`
// Not actually necessary - since Imgix is scaling,
// there is no "penalty" for including WebP by default
export const GatsbyPrismicImageFluid_withWebp_noBase64 = graphql`
fragment GatsbyPrismicImageFluid_withWebp_noBase64 on PrismicImageFluidType {
aspectRatio
src
srcSet
srcWebp
srcSetWebp
sizes
}
`