简体   繁体   中英

Images are not displayed on github pages/github.io

My images in the.markdown files are not displayed on site, but they are displayed well locally and in the repository.

Please see my github.io repository: https://github.com/TravisBAO/travisbao.github.io/blob/main/docs/_posts/2023-01-18-SSHKey.markdown

And if open the github page, they are not there: https://travisbao.github.io/2023/01/19/SSHKey.html

I try all the potential solutions:

  1. use the html format
  2. change the location of the file
  3. change the.PNG to.JPG

You're pretty much there, all you need to do is to use the correct uri for the source. Your images are located at "/assets/images/{filename}" .

In the screenshot below, I edited the path that the image tags pointed to and was able to get the images to load correctly.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM