Automatically add srcset to images in html
npm install html-srcset-loaderAutomatically add srcset to images in html
Requires image-resize-loader to create the resized images.
```
npm install --save-dev loader-utils jimp image-resize-loader html-srcset-loader
The html-srcset-loader will automatically transform any image in an html document to include an srcset with smaller versions of the image to lower bandwith usage on lower resulution screens.
`js``
loaders: [
{
test: /.*\.(png|jpg)(\?.+)?$/i,
loaders: [
'file',
'image-resize'
]
},
{
test: /\.html$/,
loader: "html!html-srcset"
},
...
]