Images stored and referenced in two different folders

#357 ยท open ยท 0 comments

View on GitHub โ†—

enury

We have a problem with the images transformed with the image plugin, but I do not know if this is a bug, or - quite likely - we are doing something wrong! Our images are stored in one place (e.g. `https://my.url/items/filename.png`) but the url in the HTML references the image in a different place, (e.g. `https://my.url/items/hiw_10/filename.png`) I've documented the problem here: https://stackoverflow.com/questions/79991352/eleventyimagetransformplugin-images-are-not-stored-and-referenced-at-the-same-pl We have not set the `urlPath` or `outputDir` options because it was not recommended with HTML Transform according to the documentation. These are the HTML Transform options + eleventy: ``` eleventyConfig.addPlugin(eleventyImageTransformPlugin, { extensions: 'html', formats: ['jpg', 'png', 'tiff', 'webp', null], // Pick your own formats widths: [200, 600, 900], // Pick your own srcset widths defaultAttributes: { loading: 'lazy', sizes: '100vw', decoding: 'async', } }); ... dir: { input: "src", includes: "_includes", data: "_data", output: "_site" } ``` Let me know if you need anymore information on our configuration. We would be grateful for any advice ๐Ÿ˜„

Comments