本文へスキップ
Skillpedia
画像とアイコン75k · #2997

responsive-images

できること

このスキルは、サイトの画像マークアップを確認し、srcsetとsizesの属性が不足しているか誤っている場所に追加します。画像をさまざまな画面サイズで表示する制作者向けです。

使う場面

  • ✓端末ごとに適切なサイズの画像が読み込まれるようにするようエージェントに頼むとき。
  • ✓スマートフォンがデスクトップ向けの大きな画像をダウンロードし、読み込みが遅いと感じるとき。
  • ✓記事のカードやギャラリーなど、複数の幅で画像を表示するコンポーネントを作っているとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/responsive-images/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

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

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`.

repo: thedaviddias/Front-End-Checklist

人気

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

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

0

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

コメント

  • …

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

似ているスキル