-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Comments
Hey. This just bit me as well and i think i figured it out.
The question here is more about "finding" local images from our markup files. And knowing what to write in our
Note: With option 2. it seems we can navigate our folder structure with paths like
I don't think we can do that from the plugin config. We need to write the full path on the image It would be great to be able to set an |
I'm pretty confused by this. If I'm using absolute paths, like |
Is your input directory named |
Hi @m4rrc0, thanks for your reply. I'm pretty sure I understood your explanation, but this behavior just seemed odd to me? When I included this in eleventyConfig.addPlugin(eleventyImageTransformPlugin, {
extensions: "html",
formats: ["webp"],
widths: [270,540,810,1080],
defaultAttributes: {
loading: "lazy",
decoding: "async",
},
}); What I thought would happen is:
My input directory is indeed In my project, images in My expectation was that when passed an absolute path ( It seems like I may have to move |
It is usually not needed to use the plugin in conjunction with You need to specify the correct path to your images on every Note that if you want to keep the original sized image, format, name, ... you can do that with the appropriate plugin options. Note 2: You could do this and still do your Note 3: If you need some hybrid approach, you can deeply customize the plugin and you can always ignore some images from being transformed with the Does this seem appropriate @N-Upchurch ? Or do you have some other special need not covered by this approach? |
@zachleat, as a path forward for closing this issue, I see 2 possible improvements.
I can try and help for 1 or 2. I'll be honest, I have way too much on my plate for the moment but I'd be really glad to contribute to 11ty ! |
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 incontent/silex-published/assets/
My config is
I don't manage to make the transform image plugin to look in a subfolder of
content
Any help will be a much appreciated, I know we are all very buisy, thank you !!
The text was updated successfully, but these errors were encountered: