From 7bd0ef7681e8eff64d80051c10930d76cfc44809 Mon Sep 17 00:00:00 2001 From: Nicolas BEJEAN <nicolas.bejean@api-and-you.com> Date: Wed, 23 Jan 2019 10:55:12 +0100 Subject: [PATCH] Gestion des images GIF et PNG --- Block/Widget/CategoryWidget.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Block/Widget/CategoryWidget.php b/Block/Widget/CategoryWidget.php index e7cca13..866246f 100755 --- a/Block/Widget/CategoryWidget.php +++ b/Block/Widget/CategoryWidget.php @@ -161,6 +161,10 @@ class CategoryWidget extends Template implements BlockInterface endif; endif; + if (substr($image,-3) != 'jpg'): + return 'media/' . $image; + endif; + if (is_null($width)) : if (is_null($this->getCategoryImageWidth())) : $width = 450; -- GitLab