Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
dazuaz committed Jun 12, 2022
1 parent 264abc5 commit 8c48494
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ Default: `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 individual images by using `?cacheDirectory=false`.

Default cache directory might be ```.node_modules/.cache/responsive-loader```
Default cache directory might be `.node_modules/.cache/responsive-loader`

```js
module.exports = {
Expand All @@ -254,8 +254,8 @@ module.exports = {
options: {
esModule: true,
cacheDirectory: true,
publicPath: "/_next",
name: "static/media/[name]-[hash:7]-[width].[ext]",
publicPath: '/_next',
name: 'static/media/[name]-[hash:7]-[width].[ext]',
},
},
],
Expand Down Expand Up @@ -327,9 +327,17 @@ In your webpack config, require your adapter

- Doesn't support `1x`, `2x` sizes, but you probably don't need it.

## See also
## Usage Examples

- Inspired by [resize-image-loader](https://github.com/Levelmoney/resize-image-loader), but simpler and without dependency on ImageMagick
### NextJS

- https://github.com/dazuaz/responsive-loader-example

### Pug

- [How to use responsive-loader with Pug](https://webdiscus.github.io/pug-plugin/responsive-image/). Thanks to the awesome [pug-loader](https://webdiscus.github.io/pug-plugin/hello-world/).

Please submit your own example to add here

[node]: https://img.shields.io/node/v/responsive-loader.svg
[node-url]: https://nodejs.org
Expand Down

0 comments on commit 8c48494

Please sign in to comment.