question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lots of deprecated warnings without a clear way to fix them

See original GitHub issue
DEPRECATED. Configure gifsicle's interlaced option in it's own options. (gifsicle.interlaced)
DEPRECATED. Configure optipng's optimizationLevel option in it's own options.
DEPRECATED. Configure gifsicle's interlaced option in it's own options. (gifsicle.interlaced)
DEPRECATED. Configure optipng's optimizationLevel option in it's own options.
DEPRECATED. Configure gifsicle's interlaced option in it's own options. (gifsicle.interlaced)
DEPRECATED. Configure optipng's optimizationLevel option in it's own options.
DEPRECATED. Configure gifsicle's interlaced option in it's own options. (gifsicle.interlaced)
DEPRECATED. Configure optipng's optimizationLevel option in it's own options.
DEPRECATED. Configure gifsicle's interlaced option in it's own options. (gifsicle.interlaced)
DEPRECATED. Configure optipng's optimizationLevel option in it's own options.
DEPRECATED. Configure gifsicle's interlaced option in it's own options. (gifsicle.interlaced)
DEPRECATED. Configure optipng's optimizationLevel option in it's own options.
DEPRECATED. Configure gifsicle's interlaced option in it's own options. (gifsicle.interlaced)
DEPRECATED. Configure optipng's optimizationLevel option in it's own options. (optipng.optimizationLevel)

I’ve set up my webpack 2 options like so to try and rectify this after it cropped up in the new version (it seems like the recommended way from the readme):

      {
        test: /\.(jpe?g|png|gif|svg)$/i,
        loaders: ['file-loader?context=src/images&name=images/[path][name].[ext]', {
          loader: 'image-webpack-loader',
          query: {
            progressive: true,
            optimizationLevel: 4,
            interlaced: false,
            optipng: {
              optimizationLevel: 4,
            },
            pngquant: {
              quality: '75-90',
              speed: 3,
            },
          },
        }],
        exclude: /node_modules/,
        include: __dirname,
      },

Tried adding that optipng option there too, because it seems that’s what the deprecations want, but no change.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:17
  • Comments:12

github_iconTop GitHub Comments

173reactions
daltonescommented, Jan 28, 2017

The warnings are about those options passed directly in query (optimizationLevel and interlaced). Now every option must be passed to the correspondent optimizer.

Sadly README is a little messed about those options. 😿

I guess that would work without any problems:

      {
        test: /\.(jpe?g|png|gif|svg)$/i,
        loaders: ['file-loader?context=src/images&name=images/[path][name].[ext]', {
          loader: 'image-webpack-loader',
          query: {
            mozjpeg: {
              progressive: true,
            },
            gifsicle: {
              interlaced: false,
            },
            optipng: {
              optimizationLevel: 4,
            },
            pngquant: {
              quality: '75-90',
              speed: 3,
            },
          },
        }],
        exclude: /node_modules/,
        include: __dirname,
      },
8reactions
daltonescommented, Feb 15, 2017

@gpltaylor The query string can be a regular stringified JSON:

var query = {
  bypassOnDebug: true,
  optipng: {
    optimizationLevel: true
  },
  gifsicle: {
    interlaced: true
  }
};
// ...
{loader: [`image-webpack-loader?${JSON.stringify(query)}`]}
Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I get rid of deprecated warnings in ... - Stack Overflow
One way to implement deprecation warnings is to produce ...
Read more >
Investigating Symfony deprecated warnings - YouTube
... courses: https://www.howtocodewell.net/coursesListen to the podcast: https://www. how... ... Your browser can't play this video.
Read more >
Dealing with deprecations - Stitcher.io
It's important to understand what deprecations are about: they aren't errors, they are notices. They are a way of notifying PHP developers about ......
Read more >
The Complete Guide for Deprecation Warnings in Rails
When it comes to production, the easiest way to discover deprecation warnings is by using a monitoring tool (like Honeybadger or Airbrake).
Read more >
Fix Your Craft CMS Deprecation Errors - CraftQuest
So, a lot of stuff. But some of those deprecated items might still be lurking in ours projects. Maybe we've avoided looking that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found