@alessio95/image-loader

0.0.1 • Public • Published

image-loader

Loader webpack to resize and compress images

Installation

npm i @alessio95/image-loader

Add the loader on your webpack.config.js

{
  test: /\.(png|svg|jpg|gif)$/,
  use: [
    {
      loader: 'file-loader',
      options: {
        name: 'images/[name].[ext]',
      },
    },
    'image-loader', // Minify & Resize images
  ],
},

The loader recovers all images from your project called in your /[s?css]/ or js files. His task is to compress your image and resize them.

Resize info :

  • small version : scale(0.5) | divide by 2
  • large version : scale(3) | 1/4 more larger

Package Sidebar

Install

npm i @alessio95/image-loader

Weekly Downloads

0

Version

0.0.1

License

ISC

Unpacked Size

3.48 kB

Total Files

3

Last publish

Collaborators

  • alessio95