lazy-loading
できること
このスキルは、ページの下の方にあるコンテンツが、必要になったときだけ読み込まれるかを確認します。最初の読み込みを軽くしたい開発者やデザイナー向けです。
使う場面
- ✓長いページで、訪問者がスクロールする前にすべての画像を読み込んでいるとき。
- ✓埋め込みの動画や地図がページの最初に読み込まれているとき。
- ✓最初の読み込みで、訪問者が見る量よりはるかに多くのデータをダウンロードしているとき。
スキルのリンク
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/lazy-loading/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のページの下の方の画像に遅延読み込みを設定してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、画面の下側に現れるコンテンツを特定し、ネイティブの遅延読み込みかIntersection Observerを提案します。ページ上部の重要な画像は遅延させません。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Implement lazy loading for offscreen content
Lazy loading defers non-critical resources until needed—this reduces initial page weight, speeds up first paint, and saves bandwidth for content users may never scroll to.
Quick Reference
- Use loading='lazy' for images below the fold
- Never lazy load LCP/above-fold images—they need priority
- Lazy load iframes, videos, and heavy components
- Use Intersection Observer for custom lazy loading
- If fold position is unclear from the snippet, do not invent a lazy-loading defect
Check
Verify that images and other heavy resources below the fold are lazy loaded. Only report this when the code or route context makes offscreen placement clear.
Fix
Implement lazy loading for images, videos, and iframes using native loading='lazy' or JavaScript solutions.
Explain
Explain how lazy loading defers resource loading until needed, improving initial page load performance.
Code Review
Review the routes, assets, and loading behavior that affect Implement lazy loading for offscreen 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-loading
よくある質問
ネイティブの遅延読み込みとは何ですか?
画像やフレームを、画面の近くに来るまで読み込みを遅らせる、ブラウザーの標準機能です。
何を遅延読み込みしてはいけませんか?
このスキルによると、ページ上部の最も大きいコンテンツ画像は決して遅延読み込みにしてはいけません。
コンテンツの位置がはっきりしない場合はどうしますか?
このスキルは、コードで配置が明確にならない限り、問題として報告しないよう勧めています。
詳細
作者による元の説明
Use when auditing slow page loads, heavy assets, or rendering delays related to Implement lazy loading for offscreen content. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes. Absence of `loading='lazy'` is not enough by itself when fold position is unknown.
人気
- GitHubのスター
- 75k
- ランキング
- #2916
- ライセンス
- MIT
- 更新日
- 2026/10/31
コメント
- …
このリポジトリの他のスキル
frontendchecklist
75kコマンドラインツールを使って、フロントエンドのコードとライブページを、アクセシビリティ、速度、SEO、セキュリティに関する380以上のルールと照らし合わせて確認します。
frontend-checklist-global
75kフロントエンドのプロジェクトを、386のFront-End Checklistのルールすべてと照らし合わせて監査し、見つかった問題ごとに具体的な修正方法を示します。
404-page
75k見つからないページの画面に役立つリンクがあり、本物の404ステータスを返すかを確認し、迷った訪問者が目的のページを見つけられるようにします。
about-page
75kサイトの運営者が誰かを説明する、分かりやすいAboutページがあるかを確認し、訪問者と検索エンジンからの信頼を高めます。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。