W3C home > Mailing lists > Public > public-respimg@w3.org > November 2014

Re: Informing the browser of the expected size of the image

From: <steve@steveclaflin.com>
Date: Tue, 11 Nov 2014 09:15:46 -0600
To: Simon Pieters <simonp@opera.com>
Cc: Attiks <attiks@gmail.com>, Nelson Menezes <nelson@fittopage.org>, Greg Whitworth <gwhit@microsoft.com>, Yoav Weiss <yoav@yoav.ws>, Fréd\"éric Kayser\" <f.kayser@free.fr>, public-respimg@w3.org, Simon Miles-Taylor <smilestaylor@gmail.com>, Ilya Grigorik <igrigorik@google.com>
Message-ID: <e8b7c6690991204ce2f22de62f881524@steveclaflin.com>

Thanks for the reference to the issue.  I see that both 85 and 86 apply 
to this discussion.

My one addition to the overall discussion is that it would be nice to be 
able to offload the specification of the image source options to a 
separate area (outside the img or picture tag).  Then that could be 
referenced in the picture or img tag.

Again, it seems similar to defining a font.  But, I can see arguments 
for and against using an at-rule - the other alternative would be a set 
of tags, which of course also has issues.  An at-rule could define a 
name (like theName), while a tag could have that as an id, and then the 
srcset attribute would be "#theName" as a reference.

Benefits would include:

   availability of clearer and more verbose descriptions for the 
individual images,
   reusability of descriptors


On 2014-11-10 04:14, Simon Pieters wrote:
> On Fri, 07 Nov 2014 18:39:29 +0100, <steve@steveclaflin.com> wrote:
>> I agree in terms of best practices, but I don't think the spec for img 
>>  disallows the use of urls with different aspect ratios in srcset.  So 
>>  then a question arises as to whether the syntax should support legal 
>> but  bad practices.
> We don't need to support bad practices. We should generally make it
> hard  to use a feature incorrectly. That suggests it shouldn't be
> possible to  specify different aspect ratios for different URLs in
> srcset, since they  should all be the same.
> However, it's possible that rounding errors causes the aspect ratios
> in  srcset to be slightly different. For instance, say you have an
> image that  is 1000x200. A scaled down version could be 333x67, which
> is perfectly  fine but is different aspect ratio. If we want the
> placeholder box to have  exactly the right size, this suggests we
> should allow (but not necessarily  require) specifying width/height or
> aspect ratio for each URL.
> Also see
> https://github.com/ResponsiveImagesCG/picture-element/issues/85  for
> more discussion.
Received on Tuesday, 11 November 2014 15:09:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:06:15 UTC