@@ -73,9 +73,6 @@ export class ImageInner extends React.Component {
73
73
clipSvg,
74
74
animation,
75
75
} = this . props ;
76
-
77
- // const imageUrl = _.get(imageSources.source, 'file.url');
78
- // const contentType = _.get(imageSources, 'file.contentType');
79
76
const clipSvgUrl = _ . get ( clipSvg , 'file.url' ) ;
80
77
const imgStyle = image . extraStylesForImage ? fixStyle ( image . extraStylesForImage ) : { } ;
81
78
if ( clipSvgUrl ) {
@@ -99,11 +96,11 @@ export class ImageInner extends React.Component {
99
96
{
100
97
animation . animateOnScroll ? (
101
98
< picture >
102
- < source srcSet = { imageSources . source . file . url } type = { imageSources . source . file . contentType } media = { imageSources . sourceMobile ? ' (min-width: 769px)' : null } />
103
- { imageSources . sourceMobile && < source srcSet = { imageSources . sourceMobile . file . url } type = { imageSources . sourceMobile . file . contentType } media = "(max-width: 768px)" /> }
104
- { imageSources . sourcePolyfillMobile && < source srcSet = { imageSources . sourcePolyfillMobile . file . url } type = { imageSources . sourcePolyfillMobile . file . contentType } media = "(max-width: 768px)" /> }
99
+ < source srcSet = { imageSources . source . file . url } type = { imageSources . source . file . contentType } media = " (min-width: 769px)" />
100
+ { imageSources . sourceMobile && < source srcSet = { ` ${ imageSources . sourceMobile . file . url } ?w=768` } type = { imageSources . sourceMobile . file . contentType } media = "(max-width: 768px)" /> }
101
+ < source srcSet = { ` ${ imageSources . source . file . url } ?w=768` } type = { imageSources . source . file . contentType } media = "(max-width: 768px)" />
105
102
< img
106
- src = { imageSources . sourcePolyfill ? imageSources . sourcePolyfill . file . url : imageSources . source . file . url }
103
+ src = { ` ${ imageSources . source . file . url } ?fm=png` }
107
104
alt = { image . alt || image . name }
108
105
style = { imgStyle }
109
106
data-aos = { animation . animateOnScroll }
@@ -119,11 +116,11 @@ export class ImageInner extends React.Component {
119
116
</ picture >
120
117
) : (
121
118
< picture >
122
- < source srcSet = { imageSources . source . file . url } type = { imageSources . source . file . contentType } media = { imageSources . sourceMobile ? ' (min-width: 769px)' : null } />
123
- { imageSources . sourceMobile && < source srcSet = { imageSources . sourceMobile . file . url } type = { imageSources . sourceMobile . file . contentType } media = "(max-width: 768px)" /> }
124
- { imageSources . sourcePolyfillMobile && < source srcSet = { imageSources . sourcePolyfillMobile . file . url } type = { imageSources . sourcePolyfillMobile . file . contentType } media = "(max-width: 768px)" /> }
119
+ < source srcSet = { imageSources . source . file . url } type = { imageSources . source . file . contentType } media = " (min-width: 769px)" />
120
+ { imageSources . sourceMobile && < source srcSet = { ` ${ imageSources . sourceMobile . file . url } ?w=768` } type = { imageSources . sourceMobile . file . contentType } media = "(max-width: 768px)" /> }
121
+ < source srcSet = { ` ${ imageSources . source . file . url } ?w=768` } type = { imageSources . source . file . contentType } media = "(max-width: 768px)" />
125
122
< img
126
- src = { imageSources . sourcePolyfill ? imageSources . sourcePolyfill . file . url : imageSources . source . file . url }
123
+ src = { ` ${ imageSources . source . file . url } ?fm=png` }
127
124
alt = { image . alt || image . name }
128
125
style = { imgStyle }
129
126
loading = "lazy"
0 commit comments