{% extends "KnpIpsumBundle::layout.html.twig" %}

{% block title "AvalancheImagineBundle Tutorial" %}

{% block content %}
    <h1>A first filter</h1>
    <div>
        <img src="{{ 'bundles/knpipsum/images/edgar-in-black.jpg'|apply_filter('thumbnail') }}" />
    </div>
    
    <h1>A second filter</h1>
    <div>
        <img src="{{ 'bundles/knpipsum/images/edgar-in-black.jpg'|apply_filter('little_nice_thumbnail') }}" />
    </div>
{% endblock %}

{% set code = code(_self) %}

{% extends "KnpIpsumBundle::layout.html.twig" %}

{% block title "AvalancheImagineBundle Tutorial" %}

{% block content %}
    <h1>A first filter ("thumbnail")</h1>
    <div>
        <img src="{{ 'bundles/knpipsum/images/edgar-in-black.jpg'|apply_filter('thumbnail') }}" />
    </div>
    
    <h1>A second filter ("little_nice_thumbnail")</h1>
    <div>
        <img src="{{ 'bundles/knpipsum/images/edgar-in-black.jpg'|apply_filter('little_nice_thumbnail') }}" />
    </div>
    
    <h1>Configuration</h1>
    <p>Here is the configuration we use to make these filters work. It's usually located in app/config.yml.</p>
    
    <pre>
avalanche_imagine:
    web_root:     %kernel.root_dir%/../web
    cache_prefix: imagine
    driver:       gd
    filters:
        thumbnail:
            type:    thumbnail
            options: { size: [300, 300], mode: outbound }
        little_nice_thumbnail:
            type:    thumbnail
            options: { size: [150, 150], mode: outbound }
    </pre>
{% endblock %}

{% set code = code(_self) %}

Add the configuration code behind imagine
Add the configuration code behind imagine
