W3C home > Mailing lists > Public > www-style@w3.org > February 2013

Re: [css4-images] Add format() hints to image()

From: Glenn Adams <glenn@skynav.com>
Date: Thu, 14 Feb 2013 07:30:45 -0700
Message-ID: <CACQ=j+fHu9Y=p80CC5yGCUvNA5oxx08w7robXetCeuPOvRdhiA@mail.gmail.com>
To: Jake Archibald <jaffathecake@gmail.com>
Cc: W3C CSS Mailing List <www-style@w3.org>
You may wish to take a look at
attempts to address some of these problems.

On Thu, Feb 14, 2013 at 3:40 AM, Jake Archibald <jaffathecake@gmail.com>wrote:

> The problem: image('whatever.webp', 'whatever.png')
> If the browser doesn't support webp it will still download 'whatever.webp'
> and attempt a decode before it'll fallback to the png. It could exit early
> when it gets the content-type header, but that's still more network
> activity than ideal.
> Solution: Introduce format(), from @font-face
> https://gist.github.com/jakearchibald/2f6baeeefd0eee59d9ec
> The browser wouldn't bother with the webp if it doesn't understand it.
> Like fonts, format isn't limited to mime types, allowing for
> format('webp-progressive'), if webp ever gets a progressive format.
> The formats would be defined by the spec, as with fonts.
> Alternative solution: format fragment
> https://gist.github.com/jakearchibald/2f6baeeefd0eee59d9ec#file-gistfile1-css-L12
> We already use the fragment for media fragments, could use it for format
> too. However, this creates repetition in image-set. Meh.
> Another alternative: Look at the 'extension'
> Could look at the suffix of the url. This has repetition in image-set as
> above, but also feels clunky, especially for format sub-types, eg
> whatever.webp-progressive.
Received on Thursday, 14 February 2013 14:31:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:26 UTC