diff --git a/cgwebp.xml b/cgwebp.xml index c0cda1b..82d2536 100644 --- a/cgwebp.xml +++ b/cgwebp.xml @@ -1,13 +1,13 @@ System - CG Webp - 2024-08-16 + 2024-09-19 ConseilGouz Copyright (C) 2024 ConseilGouz. All rights reserved. GNU/GPL pascal.leconte@conseilgouz.com https://www.conseilgouz.com - 1.2.7 + 1.2.8 PLG_SYSTEM_CGWEBP_DESCRIPTION Conseilgouz\Plugin\System\Cgwebp script.cgwebp.php diff --git a/plg_system_cgwebp_changelog.xml b/plg_system_cgwebp_changelog.xml index cc4145e..3bbd71a 100644 --- a/plg_system_cgwebp_changelog.xml +++ b/plg_system_cgwebp_changelog.xml @@ -1,4 +1,16 @@ + + plg_system_cgwebp + plugin + system + 1.2.8 + + Update : 19/09/2024 + + + Image file name with spaces causes no webp conversion + + plg_system_cgwebp plugin diff --git a/src/Extension/Cgwebp.php b/src/Extension/Cgwebp.php index 1916947..f64db69 100644 --- a/src/Extension/Cgwebp.php +++ b/src/Extension/Cgwebp.php @@ -156,6 +156,9 @@ private function isExcludedDirectory($image, $excluded) private function imgToWebp($image, $quality = 100, $excluded = array(), $stored_time = 5, $regexPath = '', $fullRegex = '', &$debugTarget = []) { + if (strpos($image,'%20')) { // filenames with %20 : JCE replaces spaces by %20, let's change this + $image = str_replace('%20',' ',$image); + } $imgPath = JPATH_ROOT . '/' . $image; $imgInfo = pathinfo($imgPath); $imgHash = md5($imgPath);