Blog posts with an image. #15
-
I am having hard time understanding where to include images for blog posts. Say I have a png in |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Jekyll by default doesn’t copy assets placed in the _posts folder. You’ll need to place it in another folder (not something with an _ underscore). Create So, your final relative URL will become |
Beta Was this translation helpful? Give feedback.
Jekyll by default doesn’t copy assets placed in the _posts folder. You’ll need to place it in another folder (not something with an _ underscore). Create
/assets/images/
and place the image there. But then, Jekyll will look for the image within the virtual folder hierarchy, with the year, month and date all represented by folders. So, the image has to be referred, relative to the root directory by adding../../../
before/assets/images/
.So, your final relative URL will become
![](../../../assets/images/img.png)