fetchpriority-attribute
できること
このスキルは、ページが重要な画像やリソースの読み込みの優先度をどのように示しているかを確認します。ページのメインのコンテンツを早く表示させたい開発者向けです。
使う場面
- ✓ページのメインのヒーロー画像の読み込みが遅いとき。
- ✓ページのスコアが、Largest Contentful Paint で低いとき。
- ✓ページの上部で多くの画像が読み込みを競っているとき。
スキルのリンク
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/fetchpriority-attribute/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“ブラウザにヒーロー画像を最初に読み込ませてもらえますか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、ファーストビューで最も大きい画像を見つけ、その画像に高い優先度のヒントを付けることを提案します。ページの下の方の画像には、低い優先度を提案することもできます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Use fetchpriority to hint resource loading priority
Browsers use internal heuristics to guess resource priority, but they cannot know which image is your LCP candidate. Adding fetchpriority="high" to the LCP image has been shown to reduce LCP by 5–30 % in real-world tests, directly improving Core Web Vitals scores and user-perceived load speed. The attribute costs nothing to add and is the lowest-effort high-impact performance optimisation available today.
Quick Reference
- Add fetchpriority="high" to the LCP image to accelerate Largest Contentful Paint
- Add fetchpriority="low" to below-the-fold images that would otherwise compete with critical resources
- Use fetchpriority="high" on <link rel="preload"> for critical fonts and CSS
- Avoid marking more than one or two resources as high priority — it defeats the purpose
Check
Check whether the LCP image or hero element has fetchpriority="high" and whether any high-priority preload links are missing the attribute.
Fix
Add fetchpriority="high" to the LCP image element and any preloaded critical resources, and fetchpriority="low" to non-critical below-the-fold images.
Explain
Explain how the browser's resource priority queue works and how fetchpriority hints change loading order to improve LCP.
Code Review
Review the HTML for images above the fold. Flag the LCP candidate if it lacks fetchpriority="high", and flag any carousel or below-fold images that lack fetchpriority="low" (they compete with critical resources).
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/performance/fetchpriority-attribute
よくある質問
fetchpriority は何をしますか?
リソースの重要度を示す HTML の属性で、ブラウザがより良い順番で読み込めるようにします。
どのくらい効果がありますか?
実際の検証では、Largest Contentful Paint で約5から30パーセントの改善が見られたと、このスキルは挙げています。
すべての画像を高い優先度にすべきですか?
いいえ。高い優先度を一つか二つより多くすると、その意味がなくなるとこのスキルは警告しています。
詳細
作者による元の説明
Use when optimising Largest Contentful Paint (LCP), reducing render-blocking resource contention, or fine-tuning resource loading order in the critical rendering path.
人気
- GitHubのスター
- 75k
- ランキング
- #2842
- ライセンス
- 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 において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。