Search code examples
htmlcssmarkdowngithub-pagesgithub-flavored-markdown

GitHub Pages Images not loading when added to new page


Okay, so I'm currently updating my github pages site to have several pages, instead of all my info being on the home page. I created new .md files and used the yaml front matter to set the title, layout, and permalink of the new page. I then copied over my markdown "code" from my index.md file to my new .md file, without changing anything. The markdown in question includes a few html lines to insert images.

For some reason, the images are loading properly on the page connected to index.md, but not on any of my new .md pages. I know it's not a case-sensitivity issue, and my new .md files are in the same directory as index.md, so its not like there's a pathing issue.

Any ideas?????

For your reference:

Homepage: http://www.catherineslaughter.space/

New page in question: http://www.catherineslaughter.space/research/

Repo: https://github.com/catieslaughts/catieslaughts.github.io

Thanks in advance!!!


Solution

  • Since you are in the 'research' folder you want to go up a level. Try ../images_pdfs/SURFfinalPoster.jpg as an example for any image you link to on your research page.

    Currently your relative path images are resolving to: http://www.catherineslaughter.space/research/images_pdfs/SURFfinalPoster.jpg

    instead of

    http://www.catherineslaughter.space/images_pdfs/SURFfinalPoster.jpg