File tree Expand file tree Collapse file tree 1 file changed +23
-23
lines changed Expand file tree Collapse file tree 1 file changed +23
-23
lines changed Original file line number Diff line number Diff line change @@ -33,36 +33,36 @@ import sharpOptimizeImages from 'gulp-sharp-optimize-images'
3333import gulp from ' gulp'
3434
3535export function yourImages () {
36- return gulp .src (' yourSrcImagePath' )
37- .pipe (
38- sharpOptimizeImages ({
39- jpg: {
40- quality: 100 ,
41- progressive: false ,
42- mozjpeg: true ,
43- },
44- webp: {
45- quality: 80 ,
46- lossless: false ,
47- },
48- avif: {
49- quality: 100 ,
50- lossless: true ,
51- effort: 4 ,
52- }
53- })
54- )
36+ return gulp .src (' yourSrcImagePath' )
37+ .pipe (
38+ sharpOptimizeImages ({
39+ jpg: {
40+ quality: 100 ,
41+ progressive: false ,
42+ mozjpeg: true ,
43+ },
44+ webp: {
45+ quality: 80 ,
46+ lossless: false ,
47+ },
48+ avif: {
49+ quality: 100 ,
50+ lossless: true ,
51+ effort: 4 ,
52+ }
53+ })
54+ )
5555
56- .pipe (gulp .dest (' yourDistImagePath' ))
56+ .pipe (gulp .dest (' yourDistImagePath' ))
5757}
5858```
5959
6060## API
6161``` js
6262sharpOptimizeImages ({
63- outputImageObject: {
64- param: value,
65- },
63+ outputImageObject: {
64+ param: value,
65+ },
6666})
6767```
6868
You can’t perform that action at this time.
0 commit comments