From 1ba7228c5bdfec6dfe22f21d595a3d7cf1378beb Mon Sep 17 00:00:00 2001 From: Floran Brutel Date: Thu, 18 Apr 2024 19:16:04 +0200 Subject: [PATCH] Use picsum.photos only when product has no image --- templates/bundles/SyliusShopBundle/Product/_mainImage.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/bundles/SyliusShopBundle/Product/_mainImage.html.twig b/templates/bundles/SyliusShopBundle/Product/_mainImage.html.twig index defb8e6..60090d2 100644 --- a/templates/bundles/SyliusShopBundle/Product/_mainImage.html.twig +++ b/templates/bundles/SyliusShopBundle/Product/_mainImage.html.twig @@ -3,9 +3,9 @@ {% elseif product.images.first %} {% set path = product.images.first.path|imagine_filter(filter|default('sylius_shop_product_thumbnail')) %} {% else %} -{% endif %} {% set size = random(5) * 200 %} {% set path = "https://picsum.photos/#{ size }/#{ size }.jpg" %} +{% endif %}
{{ product.name }}