惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Last Watchdog
The Last Watchdog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LINUX DO - 热门话题
G
GRAHAM CLULEY
S
Schneier on Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
SegmentFault 最新的问题
IT之家
IT之家
阮一峰的网络日志
阮一峰的网络日志
Recorded Future
Recorded Future
I
Intezer
云风的 BLOG
云风的 BLOG
博客园 - Franky
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
T
Tenable Blog
The Hacker News
The Hacker News
T
The Blog of Author Tim Ferriss
Attack and Defense Labs
Attack and Defense Labs
D
DataBreaches.Net
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
N
News and Events Feed by Topic
有赞技术团队
有赞技术团队
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
N
News and Events Feed by Topic
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Secure Thoughts
The Register - Security
The Register - Security
B
Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
The Cloudflare Blog
Webroot Blog
Webroot Blog
W
WeLiveSecurity
H
Heimdal Security Blog
博客园 - 三生石上(FineUI控件)
V
Vulnerabilities – Threatpost
G
Google Developers Blog
O
OpenAI News
V
V2EX
罗磊的独立博客
博客园_首页
N
News | PayPal Newsroom
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
TaoSecurity Blog
TaoSecurity Blog
Cloudbric
Cloudbric
H
Hacker News: Front Page
博客园 - 叶小钗
T
Tor Project blog
AI
AI

Adactio

June 16th, 2026, 11:12am June 16th, 2026, 10:16am Enhancing with CSS Grid Lanes How building an HTML-first site doubled our users overnight Speaking in Dublin June 13th, 2026, 9:09pm A tale of two browsers Sarah Canary by Karen Joy Fowler June 12th, 2026, 5:59pm The Field Guide to CSS Grid Lanes June 12th, 2026, 12:24pm June 12th, 2026, 8:58am June 11th, 2026, 6:22pm June 11th, 2026, 6:20pm June 10th, 2026, 6:25pm June 10th, 2026, 10:14am June 9th, 2026, 8:50pm June 9th, 2026, 1:55pm June 8th, 2026, 7:45pm June 8th, 2026, 4:32pm Amsterdamming June 5th, 2026, 3:16pm June 4th, 2026, 8:21pm June 2nd, 2026, 8:37pm 25 years of The Session Happy Monday everyone, and let's talk about gender and ethnicity ratios at tech events. AI and the Rise of Mediocrity May 28th, 2026, 7:24pm Picture at an exhibition May 27th, 2026, 9:41pm May 27th, 2026, 1:52pm May 25th, 2026, 8:03pm Gaeltacht cois Tamaise 2026 May 25th, 2026, 3:07pm May 23rd, 2026, 8:06pm May 23rd, 2026, 8:31am May 22nd, 2026, 3:38pm May 22nd, 2026, 8:19am May 22nd, 2026, 7:22am May 21st, 2026, 8:19pm Brigid by Kim Curran May 20th, 2026, 7:12pm The value is in the difficulty - Annotated May 17th, 2026, 6:21pm May 15th, 2026, 4:19pm Tito as Gaeilge The closing talks at UX London 2026 Three things about data Native Apps Should Be Avoided Whenever Possible — No One's Happy WebKit Features for Safari 26.5 May 11th, 2026, 4:17pm I knew my writing students were using AI. Their confessions led to a powerful teaching moment | Micah Nathan Gideon The Ninth by Tamsyn Muir May 8th, 2026, 3:55pm Better Browser Caching with No-Vary-Search May 7th, 2026, 9:55am May 7th, 2026, 7:49am The schedule for UX London 2026 Google’s Prompt API Reminder: You Can Stitch Together Lots of Little HTML Pages With Navigations For Interactions Netizen | Derek Sivers April 30th, 2026, 7:59pm April 29th, 2026, 8:12pm April 27th, 2026, 7:47pm April 25th, 2026, 12:03pm April 25th, 2026, 12:00pm April 25th, 2026, 8:03am April 24th, 2026, 7:57pm April 24th, 2026, 5:12pm Two Paradigms for Enhancing HTML Tags Summary punishment It's Not AI. It's FOMOnetization. Alistair Davidson / validation-enhancer · GitLab Never Lose Form Progress Again :: Aaron Gustafson Dilation Expansion artifacts April 19th, 2026, 6:03pm Finn Mac Cool by Morgan Llywelyn April 17th, 2026, 7:58am April 16th, 2026, 6:42pm Threat models No-stack web development Design and Engineering, As One · Matthias Ott April 14th, 2026, 7:21am April 13th, 2026, 7:47pm April 11th, 2026, 8:39am April 10th, 2026, 5:36pm My salary history Conference organising in 2026 April 7th, 2026, 8:32pm TinyStart AI Might Be Our Best Shot At Taking Back The Open Web | Techdirt April 6th, 2026, 12:46pm The AI Great Leap Forward April 4th, 2026, 6:42pm April 3rd, 2026, 5:27pm April 2nd, 2026, 8:58pm April 2nd, 2026, 4:32pm Web Day Out - 12 March 2026 Mistrust
HTML Video Poster Image: Enable Responsive Images and ALT Text for Poster
scottjehl · 2024-05-30 · via Adactio

What is the issue with the HTML Standard?

UPDATED: April 23, 2026

The video element currently offers a single poster attribute, which allows us to load one poster image source. This is limiting when attempting to deliver an appropriate poster image size depending on browsing conditions and art-directed video sources. Additionally, the poster frame itself does not offer a means of describing/exposing the poster image itself in the accessibility tree.

Primary proposed solutions in exploration

In the discussion thread below, two approaches are being explored as potential ways to bring responsive image selection to poster, and make poster accessible:

Approach 1.

Allowing an img element (and optional picture element parent) to be valid child elements of the video element, with the child img's currentSrc property acting as a controller for the value of the video poster (overriding the poster attribute when present). A new posterfromimg attribute would enable this relationship, and serve a dual purpose of preventing pre-existing arbitrary fallback img content from controlling a poster, and notifying browsers to not immediately fetch the poster attribute and look within instead. The full plan for this proposal is bulleted out here, and the original idea for this was here.

<!--basic, common usage for resolution-based switching -->
<video src="video.webm" poster=”video.webp” posterfromimg>
   <img srcset="video-small.webp 500w, video.webp 1000w" sizes="(max-width: 500px) 100vw, 100vw" alt="a description of the poster image here">
</video>

<!--art-directed usage-->
<video src="square-crop.webm" poster=”square-crop.webp” posterfromimg>
       <source media="(min-width: 60em)" src="wide-crop.webm">
       <picture>
         <source srcset="wide-crop.webp" media="(min-width: 60em)">
         <img src="square-crop.webp" alt="a description of the poster image here">
    </picture>
</video>

The pattern uses for resource selection, fetching, and defining alternative text, honoring its own src/srcset/sizes/alt/crossorigin/referrerpolicy/fetchpriority/decoding/loading attributes where relevant. The width and height attributes will be ignored, instead using the <video> element’s layout box. The alt text for the poster should be described through the UA's video player interface, and only while the poster is displayed (not while the video is playing).

Approach 2.

Extend the video and its source element childnodes with new attributes: postersrcset, postersizes, and posteralt, which could be set initially on the video element to provide srcset-style image resolution switching, and on child source elements to override the parent video element's attributes when a source matches. Whether there's good reason to have posteralt on video and source elements or just the video element is debatable.

<!--basic, common usage for resolution-based switching -->
<video src="video.webm" poster=”video.webp” postersrcset="video-small.webp 500w, video.webp 1000w" postersizes="(max-width: 500px) 100vw, 100vw" posteralt="a description of the poster image here">
</video>

<!--art-directed usage-->
<video src="square-crop.webm" poster=”square-crop.webp” posteralt="a description of the poster image here">
       <source media="(min-width: 60em)" src="wide-crop.webm" postersrcset="wide-crop.webp">
</video>

Pros & Cons

Both options appear roughly comparable in their ability to address the core needs of the issue.

The benefits of approach 1 are that it leans on existing HTML elements and uses composability, and brings some unique control to poster such as the ability to use fetchpriority for posters on LCP elements, and crossorigin and image decoding features that poster cannot currently use. It'll also benefit from any future improvements to the img and picture element.

Approach 2 on the other hand, brings benefits of being less verbose for art-directed use cases: existing video source elements can gain postersrcset attributes to override the poster image and share the existing <source> elements' media attributes. On the other hand, this approach some surface area to two HTML elements' IDL with the addition of 3 new-to-HTML attributes each. Browser implementations for postersrcset, postersizes, and posteralt would need to freshly introduce these concepts to elements, likely by reusing srcset and accessibility helpers from other elements that use these patterns already.

Comparison Table

Topic A — <img> / <picture> in <video> B — postersrcset / postersizes / posteralt
Mechanism
  • Image Selection: chosen URL comes from a child <img> (& optional <picture>)
  • A11y: alt on that <img>.
  • Image Selection: postersrcset / postersizes (+ poster) on <video> and on <source>.
  • A11y: new posteralt attr
Strengths
  • Reuse of img / picture docs and behaviors.
  • Poster gains existing and future img element features: fetchpriority, crossorigin, decoding.
  • In art-directed @media use cases, posters can be defined using the same <source> rows as the video, sharing media.
Costs
  • New content-model rules (img/picture become valid in video).
  • Paired/redundant media attrs (video <source> vs picture) when both branch heavily.
  • Strict capabilities. Further control would call for more img-like attributes.
  • New spec and browser APIs and attribute surface area.
  • New vocab for authors to learn
Markup — one video, srcset/sizes only ~same. poster attr + one <img srcset sizes alt> ~same. poster attr + postersrcset / postersizes / posteralt on <video>
Markup — <source media> + art-directed posters Often heavier: parallel picture / image <source> ladder beside video sources. Often lighter: postersrcset (etc.) per video <source>, same media.

This comment attempts to summarize the pros and cons in more depth.

Thanks!