html-imgwh-loader

0.1.3 • Public • Published

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'
                }
            }
        ]
    }
  ]

Package Sidebar

Install

npm i html-imgwh-loader

Weekly Downloads

0

Version

0.1.3

License

MIT

Unpacked Size

17.9 kB

Total Files

10

Last publish

Collaborators

  • jorjon