Skip to content

Commit

Permalink
Disable image optimization pipeline due to issues with animations (#1…
Browse files Browse the repository at this point in the history
…0762)

Resolves #10734 by disabling
the image transformation pipeline as its handling of animated content
does not scale well.

I'll look into resolving the issues and reenabling it.
  • Loading branch information
parlough authored Jun 19, 2024
1 parent 715ac86 commit 30aea0f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 393 deletions.
32 changes: 0 additions & 32 deletions eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { configureHighlighting } from './src/_11ty/plugins/highlight.js';
import minifier from 'html-minifier-terser';
import yaml from 'js-yaml';
import { EleventyRenderPlugin } from '@11ty/eleventy';
import { eleventyImageTransformPlugin } from '@11ty/eleventy-img';

import * as path from 'node:path';
import * as sass from 'sass';
Expand Down Expand Up @@ -172,37 +171,6 @@ ${content}

return content;
});

// Optimize all images, generate an avif, webp, and png version,
// and indicate they should be lazily loaded.
// Save in `_site/assets/images` and update links to there.
eleventyConfig.addPlugin(eleventyImageTransformPlugin, {
extensions: 'html',
formats: ['avif', 'webp', 'png', 'svg'],
svgShortCircuit: true,
widths: ['auto'],
defaultAttributes: {
loading: 'lazy',
decoding: 'async',
},
urlPath: '/assets/images/',
outputDir: '_site/assets/images/',
});
} else {
// To be more consistent with the production build,
// don't optimize images but still indicate they should be lazily loaded.
// Then save in `_site/assets/images` and update links to there.
eleventyConfig.addPlugin(eleventyImageTransformPlugin, {
extensions: 'html',
formats: ['auto'],
widths: ['auto'],
defaultAttributes: {
loading: 'lazy',
decoding: 'async',
},
urlPath: '/assets/images/',
outputDir: '_site/assets/images/',
});
}

eleventyConfig.setQuietMode(true);
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
},
"devDependencies": {
"@11ty/eleventy": "3.0.0-alpha.10",
"@11ty/eleventy-img": "5.0.0-beta.4",
"diff2html": "^3.4.48",
"firebase-tools": "^13.11.2",
"hast-util-from-html": "^2.0.1",
Expand Down
Loading

0 comments on commit 30aea0f

Please sign in to comment.