RE: CfC: to publish "The picture element" specification as a First Public Working Draft (FPWD)

The discussions on the whatwg list continued for much of 2012.
One pivotal decision appears to be articulated in the following
email by Ian Hickson:

http://lists.w3.org/Archives/Public/public-whatwg-archive/2012May/0247.html

"<img src='logo.png' alt='SampleCorp' srcset='logo-HD.png 2x'>
The problem with this proposal is that user agents want to prefetch the 
images before they start layout. This means they don't know what the 
available dimensions _are_."

>From this technical decision the choice was made by Ian to use
the viewport and density descriptor.  These decisions were
defended and I am not aware of any change in his position.  Any
alternative proposal will need to address this matter.

I concede that the viewport size could be used as a hint to allow
the UA to make an early choice.  However this hint alone does not
define the relationship between the images sizes and this
relationship is needed for the UA to be able to consider
alternatives.  Making the pixel density descriptor mandatory
might address this.

If the UA were to make a choice after the style sheets are loaded
and the layout computed then the required information might be
quite different.  If one of the images has already been loaded
then the size of the others could be inferred from the density
descriptors.  However if none of the images were yet loaded then
having the image sizes declared in the srcset syntax would
allow a choice.

Another complicating use case is noted in the following email by
Odin Hørthe Omdal who notes that the content author may want to
have the browser scale up a low resolution image to fit a larger
image box size.  The author might know that image quality is not
important for the image.

http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-October/037615.html

A hint might be included in the srcset syntax to inform the UA
that the author considers it reasonable to scale up a lower
resolution image.

Non-normative example algorithms that a UA could use to choose an
image based on the resolution needed would add credibility to the
proposal and give you something with which to test the technical
merits of the srcset syntax.

cheers
Fred

Date: Sun, 3 Feb 2013 10:51:39 +0100
Subject: Re: CfC: to publish "The picture element" specification as a First Public Working Draft (FPWD)
From: yoav@yoav.ws
To: fredandw@live.com
CC: mat@matmarquis.com; public-html-admin@w3.org; public-respimg@w3.org; public-pua@w3.org



Are the proponents of the original srcset proposal happy with it becoming a resolution hint and for the syntax to be optimized as the proposal develops for this purpose and for the use of srcset for media query based image choice to be excluded and handled only by the <source media> element attribute?


While I cannot speak for the original `srcset` proponents, we are in agreement on this with Ted O'Connor, the `srcset` spec editor.
 
Perhaps it would be best to edit the srcset proposal to be more consistent with the plan.  For example, remove the viewport size media query parameter from the syntax.  There were quite a few good ideas and discussion on the whatwg list for using srcset for this purpose and surely the syntax could be usefully extended.

 Some concerns raised with using the srcset as a resolution hint were: the image box size might not be know at the time the image could be loaded; the image resolution affects the layout.   Some consideration of these concerns would be useful.

 The viewport hints are still important for viewport based resolution 
switching, for non 'art-direction' images that maintain their 
proportions across viewports. 
If good ideas on improving the `srcset` syntax were raised on the various mailing lists and forgotten, could you please help us by linking to them? (either here or on the public-respimg mailing list)

Received on Sunday, 3 February 2013 13:45:56 UTC