Beacon is picking mp4
as an LCP element in video
#6724
Labels
module: OCI
Optimize Critical Images
priority: low
Issues that can wait
type: enhancement
Improvements that slightly enhance existing functionality and are fast to implement
Before submitting an issue please check that you’ve completed the following steps:
Describe the bug
In the following structure:
The beacon is picking
video-2.mp4
as the LCP element.It's caused by the following fall back
(source ? source.src : '')
here:The beacon will initially look for the
poster
attribute. If not found, and if there is a nested source, it will picksrc
.The only exploitable image on a
video
tag is the poster. And it only works for thevideo
tag for now.There is no need to look on nested
source
elements as they won't have a poster, at least until the related proposal comes to life whatwg/html#4004 (comment)To Reproduce
Same as above.
Expected behavior
Assessing
video
tags should be limited to theposter
attribute.Screenshots
N/A
Additional context
https://secure.helpscout.net/conversation/2624385201/497095/
Acceptance Criteria (for WP Media team use only)
Clear instructions for developers, to be added before the grooming
The text was updated successfully, but these errors were encountered: