Re: Adaptive Image Element Proposal

On Wed, 29 Aug 2012 17:28:11 +0200, Mathew Marquis <>  

> The Responsive Images Community Group has published their first pass at  
> an “adaptive images” element proposal. It’s still a bit  
> rough-around-the-edges at the moment—please let me know if there’s  
> anything you feel should be added, removed, or expanded-upon.
> Speaking for the RICG: I look forward to your feedback and continued  
> discussion of the proposed solution. The news of this proposal has  
> already prompted no small amount of cheering from the developer  
> community; I’m excited to see how it takes shape!

I took a look at the core of the proposal:

It doesn't say when this algorithm is invoked -- if it is only invoked  
once then it will not be very responsive...

"If not, continue to step two below" is confusing, it would be a lot more  
clear if the previous step ended with "abort these steps."

Finally, what I really wanted to get to:

"Evaluate source child elements per the resource selection algorithm  
already defined for the media attribute to select the appropriate source  

Referring to the resource selection algorithm for media elements makes no  
sense, first and foremost because that algorithm is designed to be run  
once and pick the first matching candidate, which is not at all what you  
want. Also, that algorithm is deeply integrated with media-specific things  
like the resource fetch algorithm, the logic for canPlayType and various  
state and events on HTMLMediaElement, so it just cannot be reused, neither  
at spec nor implementation level.

Personally, I don't think it's a good idea to reuse the syntax of <video>  
+ <source>, since it invites people to think that they work the same when  
they in fact are very different. It could be made to work, but the  
algorithm needs a lot more detail.

Disclaimer: This is neither a "yay" nor "nay" from Opera Software, just my  
POV from working on HTMLMediaElement. I won't be doing a full spec review  
and would not be the person to implement any solution for responsive  

Philip Jägenstedt
Core Developer
Opera Software

Received on Thursday, 30 August 2012 08:47:08 UTC