Web icon indicating copy to clipboard operation
Web copied to clipboard

图片无法显示的问题

Open qianguyihao opened this issue 6 years ago • 14 comments

图片无法显示的原因

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

解决办法1

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

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

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

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

解决办法2

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

qianguyihao avatar Dec 12 '18 05:12 qianguyihao

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 avatar Dec 24 '18 01:12 changeyourt

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 您好,我发现这几张图片无法显示。

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

qianguyihao avatar Dec 24 '18 02:12 qianguyihao

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

changeyourt avatar Dec 24 '18 02:12 changeyourt

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

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

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

qianguyihao avatar Dec 24 '18 02:12 qianguyihao

谢谢!为你点赞。

changeyourt avatar Dec 24 '18 02:12 changeyourt

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

image

您是否有好建议?

CHN-STUDENT avatar Aug 07 '19 01:08 CHN-STUDENT

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

qianguyihao avatar Aug 07 '19 01:08 qianguyihao

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

CHN-STUDENT avatar Aug 07 '19 01:08 CHN-STUDENT

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

qianguyihao avatar Aug 07 '19 07:08 qianguyihao

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

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

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

kagami233 avatar May 02 '20 13:05 kagami233

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

Mickyun avatar Sep 07 '20 11:09 Mickyun

当然咯,因为typora里面的图片是相对路径,建议使用OSS等存放图片

Jennifer [email protected]于2020年9月7日 周一下午7:51写道:

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/qianguyihao/Web/issues/20#issuecomment-688274892, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIRU7AIZTDWQK2S75ECCOKDSETCMJANCNFSM4GJ3DF7Q .

sukai-cheng avatar Sep 07 '20 23:09 sukai-cheng

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

TanGuangZhi avatar Dec 15 '20 14:12 TanGuangZhi

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!

pipihua666 avatar Jan 27 '21 15:01 pipihua666