lazy-above-fold
它能做什么
这个技能检查页面顶部附近的图片是否立即加载,而不是被推迟。它面向希望给访客留下快速第一印象的开发者。
适用场景
- ✓你的首图使用了懒加载,导致出现得很晚的时候。
- ✓页面上的主要产品图被设置为懒加载的时候。
- ✓你的页面因为主图加载缓慢而得分较低的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/lazy-above-fold/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我去掉页面顶部图片的懒加载设置吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会找出被设为懒加载、且很可能位于首屏的图片,并建议去掉该设置。它还会为最重要的图片建议高获取优先级。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Disable lazy loading for above-the-fold content
Applying lazy loading to hero images or other primary content can cause a significant delay in how quickly users perceive the page as loaded.
Quick Reference
- Do not use
loading="lazy"for images in the initial viewport - Lazy loading above-the-fold images delays the Largest Contentful Paint (LCP)
- Ensure critical images start downloading as early as possible
Check
Review the page's images and check for loading="lazy" on any images that are likely to be in the initial viewport (above-the-fold).
Fix
Remove loading="lazy" from above-the-fold images and consider using fetchpriority="high" instead.
Explain
Explain why lazy loading above-the-fold content negatively impacts perceived performance and LCP.
Code Review
Review the routes, assets, and loading behavior that affect Disable lazy loading for above-the-fold content. Flag exact files, requests, or rendering steps that add unnecessary network, CPU, or layout cost, and describe the measurement method used to confirm the issue.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/performance/lazy-above-fold
常见问题
懒加载为什么会影响顶部图片?
这个技能说,它会推迟最大的可见元素的加载,从而拖慢页面的第一印象。
应该用什么替代?
这个技能建议为最重要的图片设置 fetchpriority 为 high。
所有图片都应该避免懒加载吗?
不。这个技能只针对首屏的图片,位于下方的图片可以继续使用懒加载。
详情
作者的原始描述
Use when auditing slow page loads, heavy assets, or rendering delays related to Disable lazy loading for above-the-fold content. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.
热度
- GitHub 星标
- 75k
- 排名
- #2915
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。