Skip to content

Blog posts with an image. #15

Answered by jitinnair1
bajun65537 asked this question in Q&A
Discussion options

You must be logged in to vote

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)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bajun65537
Comment options

Answer selected by bajun65537
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants