Markdown中破碎的图像链接

问题描述 投票:1回答:1

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

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

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

---

**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个回答
1
投票

在实际的.md文件中,您没有使用像您所谓的引用中的相对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
© www.soinside.com 2019 - 2024. All rights reserved.