We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fb5a292 + 62554b9 commit 911dae3Copy full SHA for 911dae3
config/WebpackImageSizesPlugin.js
@@ -47,7 +47,7 @@ class WebpackImageSizesPlugin {
47
const that = this
48
const regex = {
49
srcset: /srcset="(.[^"]*)"/gm,
50
- crop: /crop="(.[^"]*)"/gm,
+ crop: /data-crop="(.[^"]*)"/gm,
51
img: /img-\d*-\d*/gm,
52
}
53
@@ -164,7 +164,7 @@ class WebpackImageSizesPlugin {
164
srcsetArr.forEach((src) => {
165
const dimensions = src.match(regex.img)
166
const retina = isRetina(src)
167
- const crop = !(cropArr && cropArr[0] === 'crop="false"')
+ const crop = !(cropArr && cropArr[0] === 'data-crop="false"')
168
169
dimensions.forEach((size, index) => {
170
const splitSize = size.split('-')
0 commit comments