BBC-News/Imager.js — pull request #21 by oncletom (2013-10-30 12:03:52+00:00)
Title: [WIP] `data-src` format

# The intention

Imager is actually quite flexible on the `data-src` pattern as long as you master regular expressions.

Also, user needs might be simpler than a RegExp pattern that in most of the case.

# The proposal

Controlling the replacement from `data-src` directly by using [URI Template](http://tools.ietf.org/html/rfc6570)-like string variables (in fact deeply simplified).

From:
```html

```

To:
```html

```

`{width}` is either replaced by any suitable `availableWidths` numeric value or, by default by `data-width`'s value.

Additional PR will provide `{width}` interpolation (to replace by a string value, Flickr or Guardian case) and pixel density adjustement (eventually through a callback to deal with more complex replacement)