Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

能否把图片的链接变成短链接呢? #18

Open
mgdreamingstar opened this issue Nov 25, 2017 · 3 comments
Open

能否把图片的链接变成短链接呢? #18

mgdreamingstar opened this issue Nov 25, 2017 · 3 comments

Comments

@mgdreamingstar
Copy link

链接太长了,在文件中挺难看的。
先谢谢作者了。

@cocoakekeyu
Copy link
Owner

是什么形式的短链接? 一般的URL都是这样长的。。

@mgdreamingstar
Copy link
Author

mgdreamingstar commented Nov 25, 2017

比如 https://github.com/cocoakekeyu/markdown-img-paste/issues/18 被变成新浪的短链接就是
http://t.cn/RYGDIJ8
新浪短链接服务的网址是 http://sina.lt/

再如,这是在 Atom 插入的图片链接地址 http://or0cssy3i.bkt.clouddn.com/markdown-img-paste-20171124001351673.png,变成短链接是 http://t.cn/RYGkALb。长度的差别还是很大的。

@cocoakekeyu
Copy link
Owner

图片等静态资源在放七牛CDN上就是追求极致的速度,用新浪短链接是多一次302跳转的HTTP请求,得不偿失。

不过你喜欢研究的话可以fork一个项目, 把程序生成的链接传给新浪API再拼接。

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

No branches or pull requests

2 participants