Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

图片无法显示的问题 #20

Closed
qianguyihao opened this issue Dec 12, 2018 · 14 comments
Closed

图片无法显示的问题 #20

qianguyihao opened this issue Dec 12, 2018 · 14 comments

Comments

@qianguyihao
Copy link
Owner

qianguyihao commented Dec 12, 2018

图片无法显示的原因

GitHub是国外网站,网络访问很慢。我上传的图片url,经常在github上无法显示,或者显示不全。但是在其他任何国内网站,都会正常显示。

解决办法1

如果你发现文中的图片加载不出来,或者图片有残缺,请尝试以下做法:

  • 机智的上网姿势:首先,你需要有能力科学上网,这个是刚需。确保顺利访问GitHub网站。

  • 添加PAC规则:需要将githubusercontent.com加入到科学上网的PAC规则中。原因是文字内容是来自 github.com,但图片是来自 githubusercontent.com。

  • 缓存问题:如果发现图片还是打不开,可以先清空浏览器的缓存图片。具体操作是:浏览器设置 -> 更多工具 -> 清除浏览数据,在弹窗中,时间范围选择“时间不限”,清除“缓存的图片和文件”。清除缓存后,再刷新页面试试。

解决办法2

下载项目到本地:当然,你也可以直接下载项目到本地,通过 markdown 软件(比如 Typora)打开项目的md格式的文件,则不会出现“图片无法显示”的问题。

@qianguyihao
Copy link
Owner Author

http://7sby7r.com1.z0.glb.clouddn.com/2015-10-03-css-27.jpg
http://7sby7r.com1.z0.glb.clouddn.com/2015-10-03-css-30.jpg
http://7sby7r.com1.z0.glb.clouddn.com/2015-10-03-css-27.png
您好,我发现这几张图片无法显示。

这几张图片,我已经修复过了。你看的应该是旧版的内容吧?

@changeyourt
Copy link

http://www.cnblogs.com/smyhvae/p/7256371.html
您好,我是从这个url访问的。您的最新版是在哪个地方?

@qianguyihao
Copy link
Owner Author

http://www.cnblogs.com/smyhvae/p/7256371.html
您好,我是从这个url访问的。您的最新版是在哪个地方?

博客园的内容,无法做到及时更新和修复。最新版的内容,请关注我的github项目。

当然,在你的提醒下, 我已经把博客园上这篇文章的内容,同步更新了下。

@changeyourt
Copy link

谢谢!为你点赞。

This was referenced Apr 12, 2019
@CHN-STUDENT
Copy link

@qianguyihao 您好,作者,许多图片我只能显示一小部分,不知道怎么回事,清除缓存后仍然存在此问题。

image

您是否有好建议?

@qianguyihao
Copy link
Owner Author

@CHN-STUDENT 您好,建议直接「下载项目到本地」,通过 markdown 软件打开项目文件,则不会出现“图片无法显示”的问题。

@CHN-STUDENT
Copy link

CHN-STUDENT commented Aug 7, 2019

@qianguyihao 好的,感谢您,建议您直接在首页说明标注:建议 clone 本项目到本地后使用 markdown
软件(如 typora) 等打开以便正确的加载图片。

@qianguyihao
Copy link
Owner Author

@CHN-STUDENT 好,已补充到 readme,感谢。

@kagami233
Copy link

@qianguyihao 发现大部分照片均无法显示。因为是从外网访问,应该不是网络问题。

Screen Shot 2020-04-19 at 6 05 32 PM

使用科学上网的同学能够访问github但是无法看到图片的同学,可以将*.githubusercontent.com加入规则中。原因是因为文字内容是来源于github.com,但是图片来源于githubusercontent.com,大部分科学上网软件pac内包含了前一个网址但是却没有包含后一个图片的网址,所以出现了能访问github但是看不到图片或者图片加载慢的问题

@Mickyun
Copy link

Mickyun commented Sep 7, 2020

请问如何使用typora才能让图片不失效呢,我本地写了markdown笔记,移动到其他目录,里面的图片就加载不出来,因为找不到对应的图片了

@sukai-cheng
Copy link

sukai-cheng commented Sep 7, 2020 via email

@TanGuangZhi
Copy link

github访问慢或者图片加载不出来的将下面的内容添加进本地host里

win端host地址:C:\Windows\System32\drivers\etc

# GitHub520 Host Start
185.199.108.154               github.githubassets.com
199.232.96.133                camo.githubusercontent.com
199.232.96.133                github.map.fastly.net
199.232.69.194                github.global.ssl.fastly.net
140.82.114.3                  gist.github.com
185.199.108.153               github.io
140.82.114.3                  github.com
140.82.113.6                  api.github.com
199.232.96.133                raw.githubusercontent.com
199.232.96.133                user-images.githubusercontent.com
199.232.96.133                favicons.githubusercontent.com
199.232.96.133                avatars5.githubusercontent.com
199.232.96.133                avatars4.githubusercontent.com
20.185.234.66                 avatars3.githubusercontent.com
199.232.96.133                avatars2.githubusercontent.com
199.232.96.133                avatars1.githubusercontent.com
199.232.96.133                avatars0.githubusercontent.com
140.82.114.10                 codeload.github.com
52.216.128.147                github-cloud.s3.amazonaws.com
52.217.39.108                 github-com.s3.amazonaws.com
52.216.107.188                github-production-release-asset-2e65be.s3.amazonaws.com
52.217.17.148                 github-production-user-asset-6210df.s3.amazonaws.com
52.217.96.108                 github-production-repository-file-5c1aeb.s3.amazonaws.com
# Star me GitHub url: https://github.com/521xueweihan/GitHub520
# GitHub520 Host End

Repository owner deleted a comment from fz1b Dec 22, 2020
Repository owner deleted a comment from qwer815983124 Dec 22, 2020
Repository owner deleted a comment from Qyijia Dec 22, 2020
@pipihua666
Copy link

github访问慢或者图片加载不出来的将下面的内容添加进本地host里

win端host地址:C:\Windows\System32\drivers\etc

# GitHub520 Host Start
185.199.108.154               github.githubassets.com
199.232.96.133                camo.githubusercontent.com
199.232.96.133                github.map.fastly.net
199.232.69.194                github.global.ssl.fastly.net
140.82.114.3                  gist.github.com
185.199.108.153               github.io
140.82.114.3                  github.com
140.82.113.6                  api.github.com
199.232.96.133                raw.githubusercontent.com
199.232.96.133                user-images.githubusercontent.com
199.232.96.133                favicons.githubusercontent.com
199.232.96.133                avatars5.githubusercontent.com
199.232.96.133                avatars4.githubusercontent.com
20.185.234.66                 avatars3.githubusercontent.com
199.232.96.133                avatars2.githubusercontent.com
199.232.96.133                avatars1.githubusercontent.com
199.232.96.133                avatars0.githubusercontent.com
140.82.114.10                 codeload.github.com
52.216.128.147                github-cloud.s3.amazonaws.com
52.217.39.108                 github-com.s3.amazonaws.com
52.216.107.188                github-production-release-asset-2e65be.s3.amazonaws.com
52.217.17.148                 github-production-user-asset-6210df.s3.amazonaws.com
52.217.96.108                 github-production-repository-file-5c1aeb.s3.amazonaws.com
# Star me GitHub url: https://github.com/521xueweihan/GitHub520
# GitHub520 Host End

this work!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants