Skip to content

Commit 1b0eaa3

Browse files
committed
Add get image url and get image as base64
1 parent 3709504 commit 1b0eaa3

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/Theme.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,16 @@ public function getScreenshotName(): string|null
244244
return $this->screenshot;
245245
}
246246

247-
public function getScreenshotImage(): string
247+
public function getScreenshotImageUrl(): string
248248
{
249-
$screenshotImage = $this->getPath() . '/' . $this->screenshot;
249+
$screenshotImagePath = $this->getAssetsPath($this->screenshot);
250+
251+
return $screenshotImagePath;
252+
}
253+
254+
public function getScreenshotImageBase64(): string|null
255+
{
256+
$screenshotImage = $this->getAssetsPath($this->screenshot);
250257

251258
if (!is_file($screenshotImage)) {
252259
return null;

0 commit comments

Comments
 (0)