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
|`name`|`string`|`[hash]-[width].[ext]`| Filename template for output files. |
177
-
|`outputPath`|`string \| Function`|`undefined`| Configure a custom output path for your file |
178
-
|`publicPath`|`string \| Function`|`undefined`| Configure a custom public path for your file. |
179
-
|`context`|`string`|`this.options.context`| Custom file context, defaults to webpack.config.js [context](https://webpack.js.org/configuration/entry-context/#context)|
180
-
|`sizes`|`array`|_original size_| Specify all widths you want to use; if a specified size exceeds the original image's width, the latter will be used (i.e. images won't be scaled up). You may also declare a default `sizes` array in the loader options in your `webpack.config.js`. |
181
-
|`size`|`integer`|_original size_| Specify one width you want to use; if the specified size exceeds the original image's width, the latter will be used (i.e. images won't be scaled up) |
182
-
|`min`|`integer`|| As an alternative to manually specifying `sizes`, you can specify `min`, `max` and `steps`, and the sizes will be generated for you. |
183
-
|`max`|`integer`|| See `min` above |
184
-
|`steps`|`integer`|`4`| Configure the number of images generated between `min` and `max` (inclusive) |
185
-
|`quality`|`integer`|`85`| JPEG and WEBP compression quality |
186
-
|`format`|`string`|_original format_| Either `png` or `jpg`; use to convert to another format. `webp` and `avif` is also supported, but only by the sharp adapter |
187
-
|`placeholder`|`boolean`|`false`| A true or false value to specify wether to output a placeholder image as a data URI |
188
-
|`placeholderSize`|`integer`|`40`| A number value specifying the width of the placeholder image, if enabled with the option above |
189
-
|`adapter`|`Adapter`| JIMP | Specify which adapter to use. Can only be specified in the loader options. |
190
-
|`disable`|`boolean`|`false`| Disable processing of images by this loader (useful in development). `srcSet` and other attributes will still be generated but only for the original size. Note that the `width` and `height` attributes will both be set to `100` but the image will retain its original dimensions. |
191
-
|**[`esModule`](#esmodule)**|`boolean`|`false`| Use ES modules syntax. |
192
-
|`emitFile`|`boolean`|`true`| If `true`, emits a file (writes a file to the filesystem). If `false`, the loader will still return a object with the public URI but will not emit the file. It is often useful to disable this option for server-side packages. |
|`name`|`string`|`[hash]-[width].[ext]`| Filename template for output files. |
175
+
|`outputPath`|`string \| Function`|`undefined`| Configure a custom output path for your file |
176
+
|`publicPath`|`string \| Function`|`undefined`| Configure a custom public path for your file. |
177
+
|`context`|`string`|`this.options.context`| Custom file context, defaults to webpack.config.js [context](https://webpack.js.org/configuration/entry-context/#context)|
178
+
|`sizes`|`array`|_original size_| Specify all widths you want to use; if a specified size exceeds the original image's width, the latter will be used (i.e. images won't be scaled up). You may also declare a default `sizes` array in the loader options in your `webpack.config.js`. |
179
+
|`size`|`integer`|_original size_| Specify one width you want to use; if the specified size exceeds the original image's width, the latter will be used (i.e. images won't be scaled up) |
180
+
|`min`|`integer`|| As an alternative to manually specifying `sizes`, you can specify `min`, `max` and `steps`, and the sizes will be generated for you. |
181
+
|`max`|`integer`|| See `min` above |
182
+
|`steps`|`integer`|`4`| Configure the number of images generated between `min` and `max` (inclusive) |
183
+
|`quality`|`integer`|`85`| JPEG and WEBP compression quality |
184
+
|`format`|`string`|_original format_| Either `png` or `jpg`; use to convert to another format. `webp` and `avif` is also supported, but only by the sharp adapter |
185
+
|`placeholder`|`boolean`|`false`| A true or false value to specify wether to output a placeholder image as a data URI |
186
+
|`placeholderSize`|`integer`|`40`| A number value specifying the width of the placeholder image, if enabled with the option above |
187
+
|`adapter`|`Adapter`| JIMP | Specify which adapter to use. Can only be specified in the loader options. |
188
+
|`disable`|`boolean`|`false`| Disable processing of images by this loader (useful in development). `srcSet` and other attributes will still be generated but only for the original size. Note that the `width` and `height` attributes will both be set to `100` but the image will retain its original dimensions. |
189
+
|**[`esModule`](#esmodule)**|`boolean`|`false`| Use ES modules syntax. |
190
+
|`emitFile`|`boolean`|`true`| If `true`, emits a file (writes a file to the filesystem). If `false`, the loader will still return a object with the public URI but will not emit the file. It is often useful to disable this option for server-side packages. |
191
+
|**[`cacheDirectory`](#cachedirectory)**|`string` or `boolean`|`false`| Experimental: If `true`, this will cache the result object but not the image files. The images are only produced once, when they are not found in the results object cache, or when the options change (cache key). For Development you can set query parameter to `?cacheDirectory=false`. |
193
192
194
193
#### Adapter-specific options
195
194
@@ -200,10 +199,8 @@ More here https://github.com/webpack/loader-utils#parsequery
200
199
##### sharp
201
200
202
201
-`background: string` — Background fill when converting transparent to opaque images. E.g. `#FFFFFF` or `%23FFFFFF` for webpack > 5
203
-
204
202
-`format: webp` — Conversion to the `image/webp` format. Recognizes the `quality` option.
205
203
-`format: avif` — Conversion to the `image/avif` format. Recognizes the `quality` option.
206
-
207
204
-`progressive: boolean` - Use progressive (interlace) scan for `image/jpeg` format.
Experimental: If `true`, this will cache the result object but not the image files. The images are only produced once, when they are not found in the results object cache, or when the options change (cache key). For Development you can set query parameter to individual images by using `?cacheDirectory=false`.
242
+
243
+
Default cache directory might be ```.node_modules/.cache/responsive-loader```
0 commit comments