Skip to content

Commit 1bd6a55

Browse files
authored
Disable 11ty image processing for now (#6000)
To test locally, checkout this branch (`gh pr checkout 6000`), run `pnpm install`, then `./dash_site serve`.
1 parent 4fac41e commit 1bd6a55

File tree

3 files changed

+0
-447
lines changed

3 files changed

+0
-447
lines changed

eleventy.config.js

-38
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import yaml from 'js-yaml';
1919

2020
import * as path from 'node:path';
2121
import * as sass from 'sass';
22-
import {eleventyImageTransformPlugin} from '@11ty/eleventy-img';
2322

2423
// noinspection JSUnusedGlobalSymbols
2524
/**
@@ -120,43 +119,6 @@ export default function (eleventyConfig) {
120119

121120
return content;
122121
});
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-
});
160122
}
161123

162124
eleventyConfig.setQuietMode(true);

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
},
2424
"devDependencies": {
2525
"@11ty/eleventy": "3.0.0-beta.1",
26-
"@11ty/eleventy-img": "5.0.0-beta.10",
2726
"firebase-tools": "^13.15.0",
2827
"hast-util-from-html": "^2.0.1",
2928
"hast-util-select": "^6.0.2",

0 commit comments

Comments
 (0)