diff --git a/src/View/Helper/ImageHelper.php b/src/View/Helper/ImageHelper.php index 9cc90d7b..934d1a53 100644 --- a/src/View/Helper/ImageHelper.php +++ b/src/View/Helper/ImageHelper.php @@ -92,7 +92,10 @@ protected function _getHash($version, $image) { public function imageUrl($image, $version = null, $options = []) { $fileInfo = pathinfo($image['path']); $hash = $this->_getHash($version, $image); - $version = $fileInfo['dirname'] . DS . $fileInfo['filename'] . '.' . $hash; + $version = $fileInfo['dirname'] . DS . $fileInfo['filename']; + if ($hash !== null) { + $version .= '.' . $hash; + } if (!empty($fileInfo['extension'])) { $version .= '.' . $fileInfo['extension'];