@@ -19,7 +19,6 @@ import yaml from 'js-yaml';
19
19
20
20
import * as path from 'node:path' ;
21
21
import * as sass from 'sass' ;
22
- import { eleventyImageTransformPlugin } from '@11ty/eleventy-img' ;
23
22
24
23
// noinspection JSUnusedGlobalSymbols
25
24
/**
@@ -120,43 +119,6 @@ export default function (eleventyConfig) {
120
119
121
120
return content ;
122
121
} ) ;
123
-
124
- // Optimize all images, generate an avif, webp, and png version,
125
- // and indicate they should be lazily loaded.
126
- // Save in `_site/assets/img` and update links to there.
127
- eleventyConfig . addPlugin ( eleventyImageTransformPlugin , {
128
- extensions : 'html' ,
129
- formats : [ 'webp' , 'png' , 'svg' ] ,
130
- svgShortCircuit : true ,
131
- widths : [ 'auto' ] ,
132
- defaultAttributes : {
133
- loading : 'lazy' ,
134
- decoding : 'async' ,
135
- } ,
136
- urlPath : '/assets/img/' ,
137
- outputDir : '_site/assets/img/' ,
138
- sharpOptions : {
139
- animated : true ,
140
- } ,
141
- } ) ;
142
- } else {
143
- // To be more consistent with the production build,
144
- // don't optimize images but still indicate they should be lazily loaded.
145
- // Then save in `_site/assets/img` and update links to there.
146
- eleventyConfig . addPlugin ( eleventyImageTransformPlugin , {
147
- extensions : 'html' ,
148
- formats : [ 'auto' ] ,
149
- widths : [ 'auto' ] ,
150
- defaultAttributes : {
151
- loading : 'lazy' ,
152
- decoding : 'async' ,
153
- } ,
154
- urlPath : '/assets/img/' ,
155
- outputDir : '_site/assets/img/' ,
156
- sharpOptions : {
157
- animated : true ,
158
- } ,
159
- } ) ;
160
122
}
161
123
162
124
eleventyConfig . setQuietMode ( true ) ;
0 commit comments