html-imgwh-loader
v0.1.3
Published
automatically add width/height attributes to img tags
Downloads
6
Readme
An HTML loader that adds width
and height
attributes to all img
tags in the HTML file.
Converts
<img src="logo.png"/>
into
<img src="logo.png" width="126" height="130"/>
Installation
npm install html-imgwh-loader
Usage
rules: [
{
test: /\.pug$/,
use: [
{
loader: 'html-loader'
},
{
loader: 'html-imgwh-loader'
},
{
loader: 'pug-html-loader',
options: {
pretty: true,
doctype: 'html'
}
}
]
}
]