{% extends 'base.html.twig' %} {% block localstyle %} img.crop-image{ width:100% } {% endblock %} {% block body %} {{ form_start(form) }} {{ form_widget(form.submit) }} {% if ratio=="1:1" %} {% set class="width:90px; height:90px;" %} {% elseif ratio=="16:9" %} {% set class="width:160px; height:90px;" %} {% elseif ratio=="16:2" %} {% set class="width:160px; height:20px;" %} {% endif %}