video-thumbnail
できること
このスキルは、ウェブページの動画プレーヤーにポスターのサムネイルを追加します。動画を洗練されて見せ、読み込み中にレイアウトがずれないようにしたいサイト運営者や開発者向けです。
使う場面
- ✓動画が再生されるまで真っ黒な四角として表示されるとき。
- ✓video要素にposter属性がないとき。
- ✓動画の読み込み中にページのレイアウトがずれるとき。
スキルのリンク
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/video-thumbnail/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私の動画は、誰かが再生を押すまで真っ黒な四角として表示されます。各動画が何についてかを示すサムネイルを追加してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、動画の縦横比に合った画像のposter属性を追加します。また、画像の読み込み中にレイアウトがずれないように、動画のサイズを設定します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Add thumbnail images to videos
Without a poster image, a <video> element displays as a blank black rectangle until the first frame is loaded. This is visually jarring, provides no context about the video content, and can cause layout shift (CLS) if the video dimensions are not specified separately. A good thumbnail image communicates the video topic at a glance, allows users to decide whether to play, and improves the page's visual quality — especially on slow connections where video preloading is delayed.
Quick Reference
- Add a
posterattribute to<video>elements with a URL to a representative thumbnail image - The poster image displays before the video loads and while the user decides whether to play
- Poster images improve perceived performance by showing meaningful content before video data arrives
- The poster should accurately represent the video content — deceptive thumbnails violate user trust
- Use an image ratio matching the video's aspect ratio (typically 16:9) and a resolution of at least 1280×720
Check
Find all <video> elements. For each, check that: (1) a poster attribute is present with a non-empty URL; (2) the URL resolves to a valid image (no 404s); (3) the width and height attributes or CSS dimensions are set to prevent layout shift while the poster loads; (4) the poster image accurately represents the video content (not a clickbait or unrelated image).
Fix
(1) Add a poster attribute to each <video> element: <video poster='thumbnail.jpg' controls>. (2) Use an image that represents the video content — typically a frame from the video, a title card, or a branded thumbnail. (3) Ensure the poster image has the same aspect ratio as the video (usually 16:9). (4) Recommended poster dimensions: 1280×720px minimum for HD video; 640×360px is acceptable for smaller embeds. (5) Host the poster image at a CDN-cached URL to ensure fast loading. (6) Also set width and height on the <video> element to prevent CLS.
Explain
The HTML poster attribute on <video> specifies a URL for an image to display before video playback begins. When preload='none' or preload='metadata' is set (recommended for performance — avoids downloading video data on page load), no video frame is available for display, making the poster image the only visual content visible to the user before play. Without a poster, users see either a black rectangle or a browser-rendered blank video frame, which provides no context. The poster also plays a role in perceived performance — users on slow connections see meaningful content immediately rather than waiting for even the first video frame to load.
Code Review
Review templates, server-rendered HTML, and shared components that output markup related to Add thumbnail images to videos. Flag exact elements, attributes, and routes where the rendered HTML violates the rule.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/html/video-thumbnail
よくある質問
サムネイルのサイズはどのくらいにすべきですか?
このスキルは、動画の形に合わせて、少なくとも1280×720ピクセルの16:9の画像を勧めています。
サムネイルが誤解を招くことはありますか?
このスキルによると、ポスターは動画の内容を正確に示すべきで、誤解を招くサムネイルは信頼を損ないます。
ポスターは字幕の代わりになりますか?
いいえ。このスキルによると、ポスターはデザインとパフォーマンスの助けであり、字幕や音声解説とは別のものです。
詳細
作者による元の説明
Use when applies to all `<video>` elements in HTML. The `poster` attribute specifies the URL of an image to show as a placeholder before the video is loaded or played. This is distinct from captions or audio descriptions, which are accessibility requirements. The poster is primarily a UX and performance enhancement, though the lack of a poster can indirectly create a CLS (Cumulative Layout Shift) issue if video dimensions are not declared.
人気
- GitHubのスター
- 75k
- ランキング
- #3075
- ライセンス
- 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 において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。