Skip to content
This repository has been archived by the owner on Mar 5, 2022. It is now read-only.

Commit

Permalink
Merge d429c39 into 2bda670
Browse files Browse the repository at this point in the history
  • Loading branch information
skie committed Apr 5, 2019
2 parents 2bda670 + d429c39 commit 4074e04
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/View/Helper/ImageHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down

0 comments on commit 4074e04

Please sign in to comment.