【问题标题】:Broken Image Links in MarkdownMarkdown 中损坏的图像链接
【发布时间】:2018-06-05 17:31:33
【问题描述】:

我正在处理以下位置的 .md 文件:

https://github.com/markroche92/SDND-Traffic-Sign-Classification/blob/master/writeup_template.md

当我在 Github 中查看 .md 文件时,我的链接图像都没有出现。我已使用以下降价代码尝试链接图像:

---

**Build a Traffic Sign Recognition Project**

[//]: # (Image References)

[image1]: ./histogram_input_data.png "Input_Data"
[image2]: ./Label26.png "Label_26"
[image3]: ./Label36.png "Label_36"
[image4]: ./Label41.png "Label_41"
[image5]: ./channels.png "Channels"
[image6]: ./nn_results.png "NN_Results"
[image7]: ./GermanRoadSigns/x32/132.jpg "Img_1"
[image8]: ./GermanRoadSigns/x32/232.jpg "Img_2"
[image9]: ./GermanRoadSigns/x32/332.jpg "Img_3"
[image10]: ./GermanRoadSigns/x32/432.jpg "Img_4"
[image11]: ./GermanRoadSigns/x32/532.jpg "Img_5"
[image12]: ./int_ims.png "Performance"
[image13]: ./top_five_predictions.png "Top_Five_Predictions"
[image14]: ./structure.jpg "Network_structure"

---

...

The following histogram shows the distribution of training, validation and 
test set images per label:

![alt text][image1]

An example image was visualised for each label. Three are displayed below:

![alt text][image2]
![alt text][image3]
![alt text][image4]


Each image has three channels (red, green, blue). The three channels are 
visualized below for an example image:

![alt text][image5]

但是,当在 Github 上查看 .md 时,似乎没有任何图像出现。谁能告诉我这里哪里出错了?

【问题讨论】:

    标签: image github markdown


    【解决方案1】:

    在实际的 .md 文件中,您没有使用假设引用中的相对 URL,而是使用像这样的绝对 URL:

    https://github.com/markroche92/SDND-Traffic-Sign-Classification/blob/master/structure.JPG
    

    这不起作用,因为它实际上是一个标准的 GitHub 文件页面,而不是图像本身。要链接到图片,请从路径中删除 /blob 并将域更改为 rawgit.com - 或者实际使用带或不带前导 ./ 的相对 URL,但请确保字母大小写正确。

    https://rawgit.com/markroche92/SDND-Traffic-Sign-Classification/master/structure.JPG
    structure.JPG
    

    【讨论】:

    • 似乎比我的回答(我删除)更合理。 +1
    【解决方案2】:

    我的一些图像也有这个问题,但其他图像没有。它最终成为我在 Markdown 文件中将图像名称大写的方式。例如:

    我电脑上的图片名称: oneGreatImage.png

    我的 Markdown 文件中的图像名称: onegreatImage.png

    当我再次将 G 大写并推送更改时,它加载得很好。 看来 GitHub 对匹配图像上的文件名非常挑剔,所以请仔细检查。

    【讨论】:

      猜你喜欢
      • 2020-07-07
      • 2016-01-18
      • 1970-01-01
      • 1970-01-01
      • 2017-09-29
      • 2020-08-24
      • 2018-10-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多