You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, maybe someone has an issue with image optimization. I've tried different parameters but still have the same result. And after conversion tinypng can optimize images with -70% result.
Hello, maybe someone has an issue with image optimization. I've tried different parameters but still have the same result. And after conversion tinypng can optimize images with -70% result.
`const {
src,
dest,
parallel,
series,
} = require('gulp');
const responsive = require("gulp-responsive");
const clean = require('gulp-clean');
const delDist = () => src('dist/**/*', {read: false}).pipe(clean())
const respImages = () => {
return src('src//*.{jpg,png}')
.pipe(
responsive({
'/.jpg': [{
width: "5%",
blur: 1.2,
quality: 50,
rename: {
suffix: '-ph'
},
format: ['webp']
}, {
width: "100%",
quality: 50,
rename: {
suffix: '@2x'
},
format: ['webp', 'jpg']
}, {
width: "50%",
quality: 50,
quality: 75,
format: ['webp', 'jpg']
}],
'**/.png': [{
width: "5%",
quality: 50,
blur: 1.2,
rename: {
suffix: '-ph'
},
format: ['webp']
}, {
width: "100%",
quality: 50,
rename: {
suffix: '@2x'
},
format: ['webp', 'png']
}, {
width: "50%",
quality: 50,
format: ['webp', 'png']
}]
}, {
errorOnEnlargement: false,
skipOnEnlargement: true,
errorOnUnusedConfig: false,
errorOnUnusedImage: false
})
)
.pipe(dest('dist'));
};
exports.default = series(delDist, parallel(respImages));
`
The text was updated successfully, but these errors were encountered: