responsive-images
できること
このスキルは、サイトの画像マークアップを確認し、srcsetとsizesの属性が不足しているか誤っている場所に追加します。画像をさまざまな画面サイズで表示する制作者向けです。
使う場面
- ✓端末ごとに適切なサイズの画像が読み込まれるようにするようエージェントに頼むとき。
- ✓スマートフォンがデスクトップ向けの大きな画像をダウンロードし、読み込みが遅いと感じるとき。
- ✓記事のカードやギャラリーなど、複数の幅で画像を表示するコンポーネントを作っているとき。
スキルのリンク
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/responsive-images/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のサイトはスマートフォンに大きな画像を送っています。端末ごとに適したサイズが届くよう、レスポンシブな画像を設定してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、複数の幅を持つsrcsetと、実際のレイアウトに合ったsizes属性を追加します。これにより、ブラウザーは各画面と画素密度に対して最も小さい適切なファイルを選べます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Implement responsive images with srcset
Serving a 2000px image to a 400px phone screen wastes bandwidth and slows loading—srcset lets the browser download only the size it needs.
Quick Reference
- Use srcset to provide multiple image sizes
- Use sizes attribute to tell browser which size to download
- Browser selects optimal size based on viewport and DPR
- Can save 50-70% bandwidth on mobile devices
Check
Verify that images use srcset and sizes attributes for responsive delivery.
Fix
Implement responsive images with srcset for different screen sizes and resolutions.
Explain
Explain how responsive images deliver optimized versions based on device capabilities.
Code Review
Inspect image markup and component abstractions for srcset, sizes, and width/height handling. Flag pages that always ship desktop-sized assets to mobile, omit sizes, or generate variants that do not match the actual rendered layout.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/images/responsive-images
よくある質問
sizesが間違っているとどうなりますか?
このスキルによると、sizesが誤っていると、ブラウザーが大きすぎるファイルを選び、srcsetの利点が失われることがあります。
画像を複数のサイズで用意する必要がありますか?
はい。srcsetには画像の複数のサイズが必要で、エージェントがその作成を手伝えます。
通信量の節約になりますか?
このスキルによると、特にモバイル端末で、通信量を大きく節約できることがあります。
詳細
作者による元の説明
Use when reviewing article images, cards, galleries, or any component rendered at multiple sizes across breakpoints. Check both the markup and the CSS layout because an incorrect `sizes` attribute can negate a perfectly good `srcset`.
人気
- GitHubのスター
- 75k
- ランキング
- #2997
- ライセンス
- MIT
- 更新日
- 2026/10/31
コメント
- …
このリポジトリの他のスキル
frontendchecklist
75kコマンドラインツールを使って、フロントエンドのコードとライブページを、アクセシビリティ、速度、SEO、セキュリティに関する380以上のルールと照らし合わせて確認します。
frontend-checklist-global
75kフロントエンドのプロジェクトを、386のFront-End Checklistのルールすべてと照らし合わせて監査し、見つかった問題ごとに具体的な修正方法を示します。
404-page
75k見つからないページの画面に役立つリンクがあり、本物の404ステータスを返すかを確認し、迷った訪問者が目的のページを見つけられるようにします。
about-page
75kサイトの運営者が誰かを説明する、分かりやすいAboutページがあるかを確認し、訪問者と検索エンジンからの信頼を高めます。