GitHub项目的官方图像主机? [英] Official image host for GitHub projects?

查看:132
本文介绍了GitHub项目的官方图像主机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我需要在GitHub项目的自述文件中包含一张图片时,我通常会将其粘贴到屏幕截图文件夹中,然后 和 CDN Planet条目



如果您浏览 README.md 页面中的 /raw.github.com/mutualmobile/MMDrawerController/master/README.md\">源代码 strong> MMDrawerController 存储库,您会注意到该图像最初并未存储在Fastly.net中。 通过标准的http(即不是https)。

 < p align =center> 
< img src =http://mutualmobile.github.io/MMDrawerController/ExampleImages/example1.pngwidth =266height =500/>
< img src =http://mutualmobile.github.io/MMDrawerController/ExampleImages/example2.pngwidth =266height =500/>
< / p>

由于 Camo 工具。



该工具简化了通过SSL主机路由图像以防止因为每个GitHub.com内容都通过https服务,所以用户不会被浏览器警告潜在的不安全内容。


Whenever I need to include a picture in a GitHub project's README file I usually just stick it in a Screenshots folder and relatively link to it. However this unnecessarily bloats the file size of the project, especially if I include an animated .gif of the project in action.

I've noticed in a couple popular Github iOS projects (like MMDrawerController and JASidePanels) that the images are NOT relatively linked, but rather they exist on a domain I've never seen - "https://github-camo.global.ssl.fastly.net". Navigating to this site directly doesn't work and Google searches bring up nothing. So for my question: is this site affiliated with GitHub, and how does one get his/her images uploaded here? Of course I could always use a generic image hosting service but I'd prefer to use one that has official ties with GitHub (if such a site exists).

Where is this?

解决方案

Fastly is not an image host, it's a content delivery network. See their website and this CDN Planet entry.

If you peek at the source code of the README.md page in the MMDrawerController repository, you'll notice that the image aren't initially stored at Fastly.net.

Moreover, they're supposed to be served through standard http (ie. not https).

<p align="center" >
<img src="http://mutualmobile.github.io/MMDrawerController/ExampleImages/example1.png" width="266" height="500"/>
<img src="http://mutualmobile.github.io/MMDrawerController/ExampleImages/example2.png" width="266" height="500"/>
</p>

The links your refer to are dynamically rewritten thanks to the Camo tool.

This tool simplify routing images through an SSL host in order to prevent users from being warned by their browser about potential unsecure content as every GitHub.com content is being served over https.

这篇关于GitHub项目的官方图像主机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆