You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pretty new to 11ty and I'm migrating an old site which has a ton of images under /images which I'd like to keep in that same location. I feel like I'm missing something simple but I can't figure out how to refer to those images from blog posts.
For example I have this file in the source tree: public/images/ocean.jpg
When the site is built, this file lands where I expect it: _site/images/ocean.jpg
In a blog post (content/blog/fifthpost.md) I want to refer to the image in the root like this: 
But that doesn't work because the image plugin changes the reference to be under the 'content' dir like this: <img src="content/images/ocean.jpg" alt="Ocean view from a beach">
Not including the image transform plugin or adding eleventy:ignore to the img tag make it work correctly. I'd like to figure out how to make this work without disabling the image transform plugin.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Pretty new to 11ty and I'm migrating an old site which has a ton of images under /images which I'd like to keep in that same location. I feel like I'm missing something simple but I can't figure out how to refer to those images from blog posts.
For example I have this file in the source tree:
public/images/ocean.jpg
When the site is built, this file lands where I expect it:
_site/images/ocean.jpg
In a blog post (content/blog/fifthpost.md) I want to refer to the image in the root like this:

But that doesn't work because the image plugin changes the reference to be under the 'content' dir like this:
<img src="content/images/ocean.jpg" alt="Ocean view from a beach">
Not including the image transform plugin or adding
eleventy:ignore
to the img tag make it work correctly. I'd like to figure out how to make this work without disabling the image transform plugin.I have a simple fork of eleventy-base-blog to demonstrate what I'm trying.
Goals:
Maybe there's a way to configure the image transform plugin to be off just for files that land in /images?
Beta Was this translation helpful? Give feedback.
All reactions