* fixed image download
This commit is contained in:
@@ -61,18 +61,18 @@ class GalleryService
|
||||
];
|
||||
}
|
||||
|
||||
public function getImage(string $slug, string $image, bool $size)
|
||||
public function getImage(string $slug, string $image, $size = false): string
|
||||
{
|
||||
$config = $this->getConfig();
|
||||
$galleryDir = sprintf(self::IMAGE_BASEDIR, $config['galleries'][$slug]['dir']);
|
||||
$imageFileName = $size
|
||||
? $galleryDir . $image
|
||||
: $this->getResizedImageName($galleryDir, $image, $size);
|
||||
? $this->getResizedImageName($galleryDir, $image, $size)
|
||||
: ( $galleryDir . $image );
|
||||
|
||||
return $imageFileName;
|
||||
}
|
||||
|
||||
protected function getResizedImageName($galleryDirectory, $imageName, $size)
|
||||
protected function getResizedImageName($galleryDirectory, $imageName, $size): string
|
||||
{
|
||||
$numericSize = $size == 'thumb' ? self::THUMBNAIL_SIZE : $size;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user