responsive-image-loader
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

responsive-image-loader

Webpack loader to create responsive images. Uses responsive-loader with sharp adapter under the hood with custom predefined options.

Can be used with babel-plugin-named-asset-import (create-react-app) to export responsiveImage instance like so:

// loaderMap comes from babel-plugin-named-asset-import configuration

['png', 'jpg', 'bmp', 'jpeg'].forEach(ext => {
    loaderMap[ext] = {
        responsiveImage: `!!${require.resolve('./images/responsive-loader')}![path]`,
    }
})

Readme

Keywords

none

Package Sidebar

Install

npm i responsive-image-loader

Weekly Downloads

2

Version

1.1.3

License

MIT

Unpacked Size

27.6 kB

Total Files

6

Last publish

Collaborators

  • pristas-peter