Skip to content

header-img 可以用其他方式加载吗? #40

Open

Description

@Asingers

比如:
header-img: /img/example.jpg
我发现当我放一些稍大,质量高一点的图,加载速度会有点慢,所以不知道能不能直接丢个云存储空间的图片链接进去
比如:
header-img: "http://abc.com/example.jpg"
我该怎么做呢?

Activity

  1. BruceZhaoR commented on Feb 1, 2016

    @BruceZhaoR
    Contributor

    目测是可以甩链接的~ 我觉得这个跟在文章中引用图片一样的原理 ,我测试过的有 '又拍网' ,加载速度还可以。

    From 邮箱大师。

  2. tshu-w commented on Feb 2, 2016

    @tshu-w
    Contributor

    测试过简单加外链不行,同求解决

  3. Asingers commented on Feb 2, 2016

    @Asingers
    Author

    @voleking 嗯,如果丢链接进去感觉应该还要改其他地方. 不懂html css 改起来挺不顺畅的 :( 我试着改了,没有加载成功.

  4. tshu-w commented on Feb 2, 2016

    @tshu-w
    Contributor

    @Asingers 我也不太会:(

  5. tshu-w commented on Feb 2, 2016

    @tshu-w
    Contributor

    @BruceZhaoR 我想知道你是怎么改的head image
    博文配置前加的么
    header-img: "http://abc.com/example.jpg" 确实不行,
    该怎么甩链接。
    博文中我用简单的html加外链,没有问题。

  6. Asingers commented on Feb 2, 2016

    @Asingers
    Author

    @BruceZhaoR @voleking

    这是 @Huxpro 文章头图的加载,注意到箭头所指的地方,直接链接是不对的,但是去掉 / 和 ' ' 是可以加载,但是图的大小不受控制,不好看了...

    This is how the @Huxpro article header map loading, note that the arrow points to the place where the direct link is not right, but remove / and '' is to be loaded, but the size of the figure is not under control, not good-looking...

  7. Asingers commented on Feb 2, 2016

    @Asingers
    Author

    @BruceZhaoR thanks,可以了 : )

  8. tshu-w commented on Feb 2, 2016

    @tshu-w
    Contributor

    @BruceZhaoR Thanks a lot,It works well know;)

  9. BruceZhaoR commented on Feb 2, 2016

    @BruceZhaoR
    Contributor

    😃

  10. added a commit that references this issue on Feb 2, 2016
  11. awei4home commented on Feb 26, 2016

    @awei4home

    确实是的,按上面改了header.intro-header{中的css,外链成功了,用的是七牛

  12. 77QingLiu commented on Apr 19, 2018

    @77QingLiu

    不是很懂,有没有大神指教一下

  13. 77QingLiu commented on Apr 20, 2018

    @77QingLiu

    @awei4home , header.intro-header这个CSS在哪个文件里面?

  14. hacker-jerry commented on Nov 2, 2019

    @hacker-jerry

    我并没有看到有什么具体的解决方法呀?是删掉了吗

  15. wq133 commented on May 12, 2021

    @wq133

    @BruceZhaoR
    您好,请问请问您是怎么解决heade-image外链问题的?
    看了issue40,看提示,修改了/includes/intro-header.html中的header.intro-header{中的background-image: ubrl(,但是在博文中添加如下,header-img: "https://gitee.com/wqh133/blog_img/raw/master/HD_1.jpg"(去掉“”尝试也未成功)
    本地服务器运行之后,博文进去后并没有成功加载背景图,请问还需要做什么修改呢?

  16. wq133 commented on May 14, 2021

    @wq133

    已解决。代码未动,直接链接即可,用的是gitee的图床,需要压缩一下图片,1m以下即可,安利一个网站,https://docsmall.com/image-compress
    压缩后,图片质量,几乎没差。

  17. CLOUDUH commented on Sep 9, 2022

    @CLOUDUH

    使用阿里云oss图床
    1、首先需要在阿里云控制台中将所使用图片的HTTP头改为jpeg或png,否则链接会直接下载文件,无法直接引用。
    2、复制链接格式为:https://xxx-oss.oss-cn-xxxx.aliyuncs.com/xxx/xxx.jpg,则在头部说明的格式为:header-image: /xxx-oss.oss-cn-xxxx.aliyuncs.com/xxx/xxx.jpg,无需引号和https前缀。

  18. Thesoul20 commented on Jan 15, 2024

    @Thesoul20

    所以说到底是需要怎样修改呢?
    我想用一下我自己的Gitee 图床需要进行怎样的配置呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions