GitHub README does now show external image on AWS S3

泄露秘密 提交于 2020-01-06 16:21:27

问题


I have a following markup inside my README file.

![](https://cs-challenge.s3-ap-southeast-1.amazonaws.com/4281a2523dc3b47813316b0400549a6295a55f05.png)

HTML also does now work,

<img src="https://cs-challenge.s3-ap-southeast-1.amazonaws.com/4281a2523dc3b47813316b0400549a6295a55f05.png" />

Snowy mountains illustration Designed by Freepik

(It works on StackOverflow)

GitHub does not render the markup properly, which converts the markdown markup above into something below,

<p><a href="https://camo.githubusercontent.com/15e4c167d484297001c34549a2cc69f0ddc80704/68747470733a2f2f63732d6368616c6c656e67652e73332d61702d736f757468656173742d312e616d617a6f6e6177732e636f6d2f343238316132353233646333623437383133333136623034303035343961363239356135356630352e706e67" target="_blank"><img src="https://camo.githubusercontent.com/15e4c167d484297001c34549a2cc69f0ddc80704/68747470733a2f2f63732d6368616c6c656e67652e73332d61702d736f757468656173742d312e616d617a6f6e6177732e636f6d2f343238316132353233646333623437383133333136623034303035343961363239356135356630352e706e67" alt="" data-canonical-src="https://cs-challenge.s3-ap-southeast-1.amazonaws.com/4281a2523dc3b47813316b0400549a6295a55f05.png" style="max-width:100%;"></a></p>


回答1:


try to use tag directly in markdown, something like

<img src='https://cs-challenge.s3-ap-southeast-1.amazonaws.com/4281a2523dc3b47813316b0400549a6295a55f05.png' width: 300 />



回答2:


The reason is that I did not set the Metadata for the image stored on AWS S3. All I need to do is to assign the correct metadata type to the file.



来源:https://stackoverflow.com/questions/40904978/github-readme-does-now-show-external-image-on-aws-s3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!