From ac5979ac8c360956a7455cec39b1c21c2f8a74af Mon Sep 17 00:00:00 2001 From: Matthieu Leproux Date: Wed, 4 May 2022 12:59:04 +0200 Subject: [PATCH] related to #1657 svg support when browsing in albums --- include/derivative.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/derivative.inc.php b/include/derivative.inc.php index fab4a8e28..9963a5068 100644 --- a/include/derivative.inc.php +++ b/include/derivative.inc.php @@ -57,7 +57,12 @@ final class SrcImage $this->flags |= self::IS_MIMETYPE; if ( ($size=@getimagesize(PHPWG_ROOT_PATH.$this->rel_path)) === false) { - $this->rel_path = 'themes/default/icon/mimetypes/unknown.png'; + $extTab = explode('.',$infos['path']); + if (strtoupper(end($extTab)) == 'SVG') { + $this->rel_path = $infos['path']; + } else { + $this->rel_path = 'themes/default/icon/mimetypes/unknown.png'; + } $size = getimagesize(PHPWG_ROOT_PATH.$this->rel_path); } $this->size = array($size[0],$size[1]);