You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**[`sizes`](#sizes)**|`(string)[]`| undefined | Sizes in the output srcset. |
91
+
|**[`scaleUp`](#scaleup)**|`boolean`|`false`| Whether or not to scale up the image when the desired width is greater than the image width. |
92
+
|**[`customOptionsFactory`](#customoptionsfactory)**|`function`| undefined | A function that returns the option to be passed on to the next loader. |
93
+
|**[`esModule`](#esmodule)**|`boolean`|`true`| Whether the export is in ES modules syntax or CommonJS modules syntax |
94
94
95
95
### `sizes`
96
96
97
-
An array containing strings in the format `"[number]w"`, `"[number]x"`, or `null`. The numbers cannot contain decimals.
97
+
An array containing strings in the format `"[number]w"`, `"[number]x"`, or `"original"`. The numbers cannot contain decimals.
98
98
99
-
Allowed: `["10w", "1x", "2x", null]`
99
+
Allowed: `["10w", "1x", "2x", "original"]`
100
100
101
101
Not allowed: `["10.0w", "1.5x", "2.0x"]`
102
102
@@ -106,7 +106,7 @@ When using `"[number]x"`, the original size of the image will be used for the gr
106
106
107
107
When true, if the desired width is greater than the image width, the size will not be included in the output srcset string. For example, if the original image is `10×10` in size, and the `sizes` array is `["5w", "10w", "15w"]`, when `scaleUp` is `true` the output string is `"image1.jpg 5w, image2.jpg 10w, image3.jpg 15w"`, when `scaleUp` is `false` the output string is `"image1.jpg 5w, image2.jpg 10w"`.
108
108
109
-
Note: this option has no effect on `"[number]x"` or `null`
109
+
Note: this option has no effect on `"[number]x"` or `"original"`
110
110
111
111
### `customOptionsFactory`
112
112
@@ -122,12 +122,12 @@ If you wish to use a resize loader other than [webpack-image-resize-loader](http
122
122
}
123
123
```
124
124
125
-
For example, if `sizes` is `["10w", "1x", "2x", null]`, `customOptionsFactory` will be called with
125
+
For example, if `sizes` is `["10w", "1x", "2x", "original"]`, `customOptionsFactory` will be called with
126
126
127
127
-`customOptionsFactory(10, undefined, existingOptions)` for `10w`
128
128
-`customOptionsFactory(undefined, 1, existingOptions)` for `1x`
129
129
-`customOptionsFactory(undefined, 2, existingOptions)` for `2x`
130
-
-`customOptionsFactory(undefined, undefined, existingOptions)` for `null`
130
+
-`customOptionsFactory(undefined, undefined, existingOptions)` for `"original"`
0 commit comments