From a0deebf4384847a4295aa806a19f6728613e4776 Mon Sep 17 00:00:00 2001 From: Kamil Kuzminski Date: Tue, 5 Nov 2019 09:56:41 +0100 Subject: [PATCH] Fix the missing image size in Contao 4.8 due to deferred images (closes #27) --- classes/SocialImages.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/SocialImages.php b/classes/SocialImages.php index fecacf0..ef547bb 100644 --- a/classes/SocialImages.php +++ b/classes/SocialImages.php @@ -43,7 +43,7 @@ public function addSocialImages(\PageModel $objPage, \LayoutModel $objLayout) foreach ($arrImages as $strImage) { - list($width, $height) = getimagesize(TL_ROOT . '/' . $strImage); + list($width, $height) = (new \Contao\File($strImage))->imageSize; // Check the dimensions limit if ($arrDimensions[0] > 0 && $arrDimensions[1] > 0)