diff --git a/src/helpers.php b/src/helpers.php index 2ae8c49..b3cbbec 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -9,9 +9,12 @@ * @param bool|null $secure * @return string */ - function asset_resized($template, $path, $secure = null) + function asset_resized($template, $path, $secure = null, $encode = false) { if ($path) { + if ($encode) { + $path = str_replace('%2F', '/', rawurlencode($path)); + } return asset(config('imageresize.route') . '/' . $template . '/' . $path, $secure); } } @@ -28,9 +31,6 @@ function asset_resized($template, $path, $secure = null) */ function asset_resized_encode($template, $path, $secure = null) { - if ($path) { - $path = str_replace('%2F', '/', rawurlencode($path)); - return asset(config('imageresize.route') . '/' . $template . '/' . $path, $secure); - } + return asset_resized($template, $path, $secure, true); } }