本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)75k · #2842

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がスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/fetchpriority-attribute/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

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.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#2842
ライセンス
MIT
更新日
2026/10/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル