1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-10 23:24:04 +02:00

Flextype Core: Glide/Intervention Image Implementation #61

This commit is contained in:
Awilum
2019-01-06 19:50:10 +03:00
parent 955f2352fb
commit 95eca6632a

View File

@@ -218,7 +218,7 @@ class Images
*/
public static function getImageUrl($path, array $params)
{
if (file_exists(PATH['entries'] . $path)) {
if (file_exists(PATH['entries'] . '/' . $path)) {
return Http::getBaseUrl() . '/site/cache/glide/' . Images::$server->makeImage($path, $params);
} else {
return "File {$path} does not exist.";
@@ -238,7 +238,7 @@ class Images
*/
public static function getImage($path, array $params, array $attributes = [])
{
if (file_exists(PATH['entries'] . $path)) {
if (file_exists(PATH['entries'] . '/' . $path)) {
return '<img '.Html::attributes($attributes).' src="'. Images::getImageUrl($path, $params) .'">';
} else {
return "File {$path} does not exist.";