0
votes

Folder layout:

/content
    /certificates
        /images
            picture_name.png
        file_trying_to_access_images.md
/jekyll
    /_site
        /img
            picture_name.png
            logo.png
    /img
        picture_name.png
        logo.png

I am having trouble accessing the pictures within my repo on my Jekyll site. "logo.png" is found and works fine, but all the other pictures are not showing up in the "Sources" tab within Chrome's inspector. I originally had the pictures inside an image folder within the content folder, then moved them to the img folder within the jekyll folder, and finally tried within the jekyll/_site/img folder.

I have also built and served it with each change locally. It shows the path being changed, but never updates the actual img folder in Sources.

Any ideas on what I am doing wrong would be great!

I had the images working in the Markdown previewer I was using. The current syntax I have for my images within the jekyll/_site/img folder are:

![alt text](/../../jekyll/_site/img/picture_name.png "Picture Name")

![alt text](/img/picture_name.png "Picture Name")

1
As a security measure, it is generally an error for a web server to be able to access any files outside of the server root. This basic principle carries over to static site generators (such as Jekyll). Therefore, your Jekyll site would only have access to files within the "site" directory and any child directories, but not elsewhere on the system. That said, it appears that you can't get that to work either. Perhaps if you narrowed your question to that one scenario, you would get some better help.Waylan

1 Answers

0
votes

It appears that you aren't able to move images around using windows explorer. I needed to use the command line to move the images to their new folder and then I was able to access the pictures.