zouhir / lqip-loader

Low Quality Image Placeholders (LQIP) for Webpack
1.21k stars 44 forks source link

Invalid settings specified for the resizer. #29

Open jordicasesnoves opened 4 years ago

jordicasesnoves commented 4 years ago

Hi!

So basically I'm using the loader with Next.js.

I set up my next.config.js file (webpack config) like this:


module.exports = {
  webpack: (config, options) => {
    config.module.rules.push({
      test: /\.(png|jpe?g)$/,
      loaders: [
      {
        loader: 'lqip-loader',
        options: {
        path: '/public', // your image going to be in media folder in the output dir
        name: '[name].[ext]', // you can use [hash].[ext] too if you wish,
        base64: true, // default: true, gives the base64 encoded image
        palette: true // default: false, gives the dominant colours palette
      }
    }
  ]
    })

    return config
  },
}

So when I start the server I'm always getting this error:

_Error: Invalid settings specified for the resizer. at Resize.initialize (C:\Users\Jorudi\Code\NodeJSBlog\node_modules\jimp\resize.js:25:16) at new Resize (C:\Users\Jorudi\Code\NodeJSBlog\node_modules\jimp\resize.js:17:10) at Jimp.resize (C:\Users\Jorudi\Code\NodeJSBlog\node_modules\jimp\index.js:1762:22) at C:\Users\Jorudi\Code\NodeJSBlog\node_modules\lqip\index.js:30:28 at runMicrotasks () at processTicksAndRejections (internal/process/taskqueues.js:97:5)

I have like +800 images...so this error shows up +800 times and then the server stucks.