Jekyll Pagination Path for img assets

87 Views Asked by At

I followed this tutorial for adding pagination to my blog site. For the most part it worked except all the thumbnail/preview images for the blog posts are no longer found because the path is now http://myblog.com/page2/ or page 3, etc. and my assets path in the front matter is:

---
layout: post
title:  "My first blog post"
image: assets/img/post_image.png

so i keep receiving: ERROR `/page2/assets/img/post_image.png' not found.

How can i resolve this? Only the images on the first page of the site are found properly because there's no new path.

1

There are 1 best solutions below

0
On

Just needed to make the image path a relative path like /assets/img/post_image.png and it was fixed.