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

5.0.1版本next lazyload失效了? #998

Closed
shliujing opened this issue Jul 20, 2016 · 11 comments
Closed

5.0.1版本next lazyload失效了? #998

shliujing opened this issue Jul 20, 2016 · 11 comments

Comments

@shliujing
Copy link

对比

我的博客,首页加载完毕大概2-3M:www.iamlj.com

以前版本的某位博主的,首页加载完毕大概500K~1M:www.arao.me

现在next主题普遍都有这个问题,文章预览图片功能很赞。
不过图片导致首页加载慢,加之国内墙的原因,博客加载就更慢了。

@xovel
Copy link

xovel commented Jul 21, 2016

图片可以考虑国内cdn平台。

@shliujing
Copy link
Author

我用的是七牛,不过这2M的加载,的确拉低了很多速度。
所以才想的整lazyload,但是主题内置的功能是失效的,我尝试自己添加,也还是失效...

@skybluefly
Copy link

插件没问题,只是本身lazyLoad这插件有使用条件,它引用路径方式要写成data-original而不是src,而在markdown里面使用![]()方式插入图片,5.0.1的模版并没对src做修改,要生效,在markdown插入图片是直接写src的代码:<img data-original="图片地址" />即可,我的网站没问题:http://codeliker.com/

@skybluefly
Copy link

另外,我现在用的不是lazyLoad,那个要10k太大了,建议换Echo.js,这个更小。

@Maples7
Copy link

Maples7 commented Aug 20, 2016

@skybluefly 亲测有效,感谢!

@Maples7
Copy link

Maples7 commented Aug 20, 2016

不过首页小图预览这个需求依然 + 1...

@skybluefly
Copy link

@Maples7 这个主题原本有这个功能的?如果不是,通常做法是:开头插入一张图片,然后在markdown一定的范围<!-- more -->就行了

@Maples7
Copy link

Maples7 commented Aug 23, 2016

@skybluefly 我主要的需求是对 grouppictures 样式,在主页用缩略图。

@skybluefly
Copy link

@Maples7 不懂,有示例么?

@ivan-nginx
Copy link
Collaborator

@shliujing dont understand u, write in English if not solved. If solved, close it please. Thank's!

@ivan-nginx
Copy link
Collaborator

#1649 (PART 4. Lazy load images.).

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

No branches or pull requests

6 participants