-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
TemplateWriterWriteError
when trying to use the plugin
#8
Comments
The problem you are facing looks similar to #7. |
Also, you might want to start with mandatory options: |
It really looks like a folder structure problem. Already tried a bunch of combinations and nothing works. I'm lost here. I don't have a "src" folder.
|
Can you try with |
Still does not work.
console:
|
If you wish I can provide you all the code. If we are able to make this work it could help other people that have the same issue. This plugin seems really good. Not having to use short codes is the best way to go. |
I've uploaded the code and made the repo public. |
@ornelasnarciso Please go through the thread, #7. Both |
#7 only shows the text: "No description provided." Nothing else. Followed the instructions on readme, and the plugin still does no work. The (Quick Start) will provide empty spaces and no images. For some reason the plugin only applies changes to images on markdown files. All the others are not affected. const img2picture = require("eleventy-plugin-img2picture"); module.exports = function (eleventyConfig) { The advanced option makes no changes and provides no errors on the console. Is it correct to write "development" ( if (process.env.ELEVENTY_ENV === "development") {)? I assumed it has to be this way since there's no instructions about it. const img2picture = require("eleventy-plugin-img2picture"); const img2pictureOptions = { /============== module.exports if (process.env.ELEVENTY_ENV === "development") { |
With quick start example, try these settings: {
eleventyInputDir: ".",
imagesOutputDir: "_site/images/",
urlPath: "/images/"
}
|
Now it's working with that quick start. :) And how should i proceed to use the advanced? I want to control de image sizes. And sorry for taking your time. Thank you for the help. |
Great! Glad to know it worked. You should be able to use all options other than
|
TemplateWriterWriteError
when trying to use the plugin
This is the best plugin for images on eleventy. Thank you very much for your time and help. :) |
Me again. Everything is working fine but i totally forgot about the images that are passed on the css something like => background-image: url("imageFile.png");. It's obvious they don't have the "img" attribute so the plugin doesn't know they exist. Is there any way to make the plugin work with images called from the css? Thank you. |
No. This plugin only optimises images in HTML files referenced with |
OK. Thank you. :) |
Hello there. I'm having trouble making the plugin work.
I'm getting this error on the terminal:
TemplateWriterWriteError
was thrownThe path exists and it's correct, so I don't get the error. I'm a self taught programmer and sometimes is very hard to understand why things don't work. (the project does not have a "src" folder)
Thank you for your time.
The code:
const img2picture = require("eleventy-plugin-img2picture");
module.exports:
The text was updated successfully, but these errors were encountered: