Skip to content

Commit

Permalink
Fix the missing image size in Contao 4.8 due to deferred images (closes
Browse files Browse the repository at this point in the history
  • Loading branch information
qzminski committed Nov 5, 2019
1 parent 8a7078a commit a0deebf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/SocialImages.php
Expand Up @@ -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)
Expand Down

0 comments on commit a0deebf

Please sign in to comment.