Eleventy Transform: how to specifiy where the images are stored?
lexoyo opened this issue · comments
Alex Hoyau commented
Hello
I'm sorry if it's a documented question but I struggle with this for a day now
After following the instructions I can't get the images to be found on disk (I get the ENOENT: no such file or directory, stat 'content/assets/test.svg'
)
My images are not in content/assets/
but in content/silex-published/assets/
My config is
{
dir: {
input: 'content',
layouts: '_layouts',
includes: '_includes',
data: '_data',
output: site.eleventyOutput,
},
}
I don't manage to make the transform image plugin to look in a subfolder of content
eleventyConfig.addPlugin(eleventyImageTransformPlugin, {
extensions: "html",
formats: ["avif", "jpeg"],
defaultAttributes: {
loading: "lazy",
decoding: "async",
sizes: "100vw",
},
// urlPath: './silex-published/assets/', // ====> doesn't do anything
})
Any help will be a much appreciated, I know we are all very buisy, thank you !!