diff --git a/src/Helper/ToolboxFile.php b/src/Helper/ToolboxFile.php index 72dbff703..af3f0a4b6 100644 --- a/src/Helper/ToolboxFile.php +++ b/src/Helper/ToolboxFile.php @@ -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 { @@ -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']))) @@ -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.