Skip to content

Commit 1625535

Browse files
committed
Add passthrough for images not directly associated with content
1 parent fda7e1e commit 1625535

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/config/passthroughs.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,19 @@ export default {
1212

1313
eleventyConfig.addPassthroughCopy(config);
1414
},
15+
16+
/**
17+
* Copy images to the `public` directory
18+
*
19+
* Note: Images directly associated with content should be saved
20+
* in the `src/content` directory alongside the content file where
21+
* HTML transforms will optimize them automatically.
22+
*
23+
* https://www.11ty.dev/docs/plugins/image/#html-transform
24+
*/
25+
images: async function (eleventyConfig) {
26+
let config = { 'src/assets/images': 'assets/images' }
27+
28+
eleventyConfig.addPassthroughCopy(config);
29+
}
1530
};

0 commit comments

Comments
 (0)