Fix image pipeline
This commit is contained in:
parent
e18b6692ad
commit
a2c6e620c9
3 changed files with 4 additions and 26 deletions
|
|
@ -60,14 +60,16 @@ module.exports = (env, argv) => ({
|
|||
loader: 'responsive-loader',
|
||||
options: {
|
||||
adapter: Sharp,
|
||||
name: '[contenthash]-[width].[ext]',
|
||||
name: '[contenthash].[ext]',
|
||||
outputPath: 'static/',
|
||||
sizes: [200, 400, 800, 1200, 1600, 2000],
|
||||
quality: 0.9,
|
||||
format: 'webp',
|
||||
progressive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.(webm|mp4|gif)$/i,
|
||||
test: /\.(webm|mp4)$/i,
|
||||
use: [
|
||||
{
|
||||
loader: 'file-loader',
|
||||
|
|
@ -76,29 +78,6 @@ module.exports = (env, argv) => ({
|
|||
name: '[contenthash].[ext]',
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'image-webpack-loader',
|
||||
options: {
|
||||
disable: argv.mode === 'development',
|
||||
mozjpeg: {
|
||||
progressive: true,
|
||||
quality: 65,
|
||||
},
|
||||
optipng: {
|
||||
enabled: true,
|
||||
},
|
||||
pngquant: {
|
||||
quality: [0.65, 0.9],
|
||||
speed: 4,
|
||||
},
|
||||
gifsicle: {
|
||||
interlaced: false,
|
||||
},
|
||||
webp: {
|
||||
quality: 65,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue