Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eleventy Transform: how to specifiy where the images are stored? #216

Open
lexoyo opened this issue Feb 22, 2024 · 0 comments
Open

Eleventy Transform: how to specifiy where the images are stored? #216

lexoyo opened this issue Feb 22, 2024 · 0 comments

Comments

@lexoyo
Copy link

lexoyo commented Feb 22, 2024

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 !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant