Skip to content

Instantly share code, notes, and snippets.

@marcoscaceres
Created November 28, 2012 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcoscaceres/4161268 to your computer and use it in GitHub Desktop.
Save marcoscaceres/4161268 to your computer and use it in GitHub Desktop.
Bugs to file against srcset

Bug 1 - Art Direction not supported

Although img@srcset supports the resolution matching use case in a limited way, it does not fully support the art direction use case. To support the the art direction use case, there needs to be some mechanism in place to force the browser to display a given image when condition is met. This is akin to the use case for CSS's !important rule.

Bug 2 - No way to determine which source is being displayed

The img@srcset spec lacks a script-based means to determine what resource the image element is displaying (if any). The use case for this is for testing and generally for a developer to know what is going on.

Bug 3 - lacks way to support different image types

The img@srcset spec currently lacks a way for alternative image formats to be supported. This means that content negotiation must be done on either on the server, which is knows to be both problematic and does not scale well. Or it must be done on the client using a whole bunch of nasty hacks (e.g., downloading a 1x1 pixel image, seeing if it's supported, etc.).

Bug 4 - lacks means to sensibly manipulate sources

The img@srcset solution lacks a means to programmatically interface with image resources, as well as access relevant attributes and methods that make the solution practical to work with (i.e., it shouldn't require complicated Regex or nested loops to manipulate values).

TODO: add link to Rick's example.

Bug 5 - syntax only supports mobile first

The img@srcset does not afford developers the ability to define the breakpoints for images as either minimum values (mobile first) or maximum values (desktop first) to match the media queries used in their design.

See: "secrete src" http://adactio.com/journal/5474/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment