1
votes

I made a blog with Jekyll but my new post can't load the images.

I'm trying to load them following the example on Jekyll site by adding the image path to the .md document:

![My helpful screenshot]({{ site.url }}/assets/screenshot.jpg)

I got all my images on a folder called _images placed in the root directory (Github project). When I try to add them with a line like this it won't work:

![canvas.png](/_images/canvas.png)

I already tried this too:

![canvas.png]({{site.url}}/_images/canvas.png)

I tried to change add these variables on _config.yml also:

baseurl:/reponame
repo:repo url

But I did not get the images to load.

Why is this happening? Anyone knows how to make the images load?

1

1 Answers

0
votes

Directories that starts with an underscore in Jekyll are special, unless they are meant to be processed they won't be used, as in this case the _images folder. You can rename the folder to images and then its content would be places directly in _site/images and can be accessed with:

![My helpful screenshot]({{"/images/screenshot.jpg" | absolute_url}})