From c5fdf18c7bcf1c51d00e01cfb59d85258cf24125 Mon Sep 17 00:00:00 2001 From: Josef Samek Date: Thu, 15 Feb 2024 21:34:33 +0100 Subject: [PATCH] =?UTF-8?q?Mo=C5=BEnost=20vytvo=C5=99it=20vlastn=C3=AD=20p?= =?UTF-8?q?laceholder=20v=20ur=C4=8Dit=C3=A9=20velikosti=20z=20lok=C3=A1ln?= =?UTF-8?q?=C3=ADho=20obr=C3=A1zku.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Kollarovic/Thumbnail/AbstractGenerator.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Kollarovic/Thumbnail/AbstractGenerator.php b/src/Kollarovic/Thumbnail/AbstractGenerator.php index af2a888..fb6d1b6 100644 --- a/src/Kollarovic/Thumbnail/AbstractGenerator.php +++ b/src/Kollarovic/Thumbnail/AbstractGenerator.php @@ -60,7 +60,10 @@ public function thumbnail(string $src, int|string|null $width, int|string|null $ $this->crop = $crop; if (!is_file($this->src)) { - return $this->createPlaceholderPath(); + $this->src = $this->wwwDir . '/' . $this->placeholder; + if (!is_file($this->src)) { + return $this->createPlaceholderPath(); + } } $thumbRelPath = $this->createThumbPath();