Browse Source

liip_imagine.yaml

master
art.dambrine 4 years ago
parent
commit
1c0b4804f8
  1. 7
      config/packages/liip_imagine.yaml
  2. 2
      templates/pokemon/index.html.twig

7
config/packages/liip_imagine.yaml

@ -13,9 +13,4 @@ liip_imagine:
max: [1280, 720] max: [1280, 720]
post_processors: post_processors:
jpegoptim: { strip_all: true, max: 70, progressive: true } jpegoptim: { strip_all: true, max: 70, progressive: true }
optipng: { strip_all: true, level: 5 } optipng: { strip_all: true, level: 2 }
my_max_down_scale_filter_240p:
filters:
downscale:
max: [360, 240]

2
templates/pokemon/index.html.twig

@ -53,7 +53,7 @@
{% for pokemon in pokemon %} {% for pokemon in pokemon %}
<tr> <tr>
<td scope="row">{{ pokemon.numero }}.</td> <td scope="row">{{ pokemon.numero }}.</td>
<td scope="row">{{ pokemon.nom }} {% if pokemon.imageName %} <img style="margin-left: 5px;" src={{ asset('/images/pokemons/' ~ pokemon.imageName) | imagine_filter('my_max_down_scale_filter_240p')}} alt="pokemon-img" height="30px"> {% endif %}</td> <td scope="row">{{ pokemon.nom }} {% if pokemon.imageName %} <img style="margin-left: 5px;" src={{ asset('/images/pokemons/' ~ pokemon.imageName) }} alt="pokemon-img" height="30px"> {% endif %}</td>
<td scope="row">{{ pokemon.type1.name }}</td> <td scope="row">{{ pokemon.type1.name }}</td>
<td scope="row">{% if pokemon.type2 %} {{ pokemon.type2.name }} {% endif %}</td> <td scope="row">{% if pokemon.type2 %} {{ pokemon.type2.name }} {% endif %}</td>
<td scope="row">{{ pokemon.generation.name }}</td> <td scope="row">{{ pokemon.generation.name }}</td>

Loading…
Cancel
Save