This makes use of Webpack and Imager without any ‘non-standard’ Webpack plugins.
$ npm install$ npx webpackWill save the optimized images to ./dist/public.
Note that Webpack may emit warnings for “large” files. Annoyingly it’s only considering the ‘input’ file size, and not the ‘output’ or optimized file size.