Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/Helper/ToolboxFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,9 @@ private function processFile($fileName)
'isPicture' => false,
];

$information['lb'] = 'lb_' . $this->getLightboxId();
$information['imageUrl'] = $fileName;

// Prepare GD images.
if ($information['isGdImage'] = $file->isGdImage) {
try {
Expand All @@ -1163,8 +1166,6 @@ private function processFile($fileName)
$information['isGdImage'] = false;
}

$information['lb'] = 'lb_' . $this->getLightboxId();

if (
file_exists($this->rootDir . '/' . $information['src'])
&& (false !== ($size = getimagesize($this->rootDir . '/' . $information['src'])))
Expand All @@ -1173,14 +1174,11 @@ private function processFile($fileName)
$information['h'] = $size[1];
$information['wh'] = $size[3];
}

$information['imageUrl'] = $fileName;
}

// Prepare SVG images.
if ($information['isSvgImage'] = $file->isSvgImage) {
$information['src'] = $fileName;
$information['imageUrl'] = $fileName;
$information['src'] = $fileName;
}

// Prepare the picture for provide the image size.
Expand Down