feat(liip_imagine): Ajoute le filtre 'product_card' et l'utilise sur la page d'accueil.

This commit is contained in:
Serreau Jovann
2026-01-22 21:59:32 +01:00
parent ff2fe2cab6
commit 960074fcfd
2 changed files with 8 additions and 1 deletions

View File

@@ -14,3 +14,9 @@ liip_imagine:
filters:
strip: ~
thumbnail: { size: [ 99, 56 ], mode: inset }
product_card:
quality: 75
format: 'webp'
filters:
strip: ~
thumbnail: { size: [600, 750], mode: outbound }

View File

@@ -142,8 +142,9 @@
<div class="relative overflow-hidden rounded-[2.5rem] aspect-[4/5] bg-slate-50 flex items-center justify-center">
{% if product.imageName and product.imageName != "" %}
<img src="{{ vich_uploader_asset(product,'imageFile') | imagine_filter('webp') }}"
<img src="{{ vich_uploader_asset(product,'imageFile') | imagine_filter('product_card') }}"
alt="{{ product.name }}"
loading="lazy"
class="w-full h-full object-cover transform group-hover:scale-110 transition-transform duration-700">
{% else %}
<div class="flex flex-col items-center justify-center p-12 text-center">