I’ll try to make this short. Don’t know if this is a bug or a feature.
I decided to see if I could transition an old blog I wrote in Jeykll years ago to a simple Rails blog. More or less something like the Rails 7 intro demo app. Basically just an Article model with a content and title. Rather than use action text, I used marked.js with a stimulus controller that did the conversion. This was a new rails app using importmaps.
I copied a few Jeykll posts and created articles. All worked fine, except images. I tried every way I could thing of to access and image with a markdown image tag (or just an html img tag) and nothing worked. I did get it to work by creating a simple image server on my staging server, but that didn’t feel right for about 30 images.
I did have a slim plugin in the jekyll app and it would render slim with a image_tag call, but no pure img.
I decided to give it another try and see if I could find a way to set src=“xxx” to something that worked.
I copied my images folder from the Jeykll app to my rails app to(under) app/assets/images, so I had app/assets/images/images.
One of my articles has a bunch of different attempts to display the image. Low and behold, one of them worked.
![Home, 1930's](/assets/images/houseMid30s.jpg "1105/07 Eisenhower Dr, Russellton PA")
I assume bin/dev must be doing this, but why to an images folder inside the images folder. I doubt if this will work in production and i’m not where ready to deploy this. In my header, only the images that were loaded showed up.
Again, looks like a backdoor!