I'm using Jekyll with Kramdown on Github, and I want to insert an image in my page. So I use

and include img1.jpg
in the folder _posts
The generated HTML is
<p> <img src="img1.jpg" alt="img1" /> </p>
but then the link is
http://username.github.io/projectname/2017/04/27/img1.jpg
and this link does not exist. How can I correct it?