ezsystems/ezp-next — pull request #94 by lolautruche (2012-10-19 15:32:14+00:00)
Title: Implemented image alias generator, using legacy kernel

**DO NOT MERGE** (I'll do it when it's ready)

This PR defines a twig helper that fetches the appropriate `ImageVariant` object.

It introduces a new SPI interface, `VariantService`, virtually applicable to any kind of field (like Word documents to render PDF for instance).

## Usage

### Normal usage (template based, like `attribute_view_gui`):

```jinja
{{ ez_render_field(
my_content,
"my_image_field_identifier",
{
'parameters': {'alias': 'large'}
}
)
}}
```

### Raw usage

```html+jinja
{# field is a regular Field object, versionInfo a VersionInfo object, all accessible from Content, which is passed to any content template #}

{% set imageAlias = ez_image_alias( field, versionInfo, 'large' ) %}

```