From 8c48494ccedad9865e63efc8099cf7ace057dd8e Mon Sep 17 00:00:00 2001 From: Daniel Zuloaga Date: Sun, 12 Jun 2022 11:11:13 -0400 Subject: [PATCH] readme update --- README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ecb346d..c4fe892 100644 --- a/README.md +++ b/README.md @@ -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 = { @@ -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]', }, }, ], @@ -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