if($this->name == 'og:image')
{
list($width, $height) = getimagesize($tagValue);
$graphValue .= '<meta property="og:image:width" content="' . $width . '"/>' . CARRIAGE_RETURN;
$graphValue .= '<meta property="og:image:height" content="' . $height . '"/>' . CARRIAGE_RETURN;
}
//Add twitter first, so only first image is added to twitter
$graphValue .= '<meta property="' . $this->name . '" content="' . $tagValue . '"/>' . CARRIAGE_RETURN; // <-- This code is already there
if($this->name == 'og:image') // <!-- This is the new code to add
{
list($width, $height) = getimagesize($tagValue);
$graphValue .= '<meta property="og:image:width" content="' . $width . '"/>' . CARRIAGE_RETURN;
$graphValue .= '<meta property="og:image:height" content="' . $height . '"/>' . CARRIAGE_RETURN;
}
}
return $graphValue;
Join our newsletter to get alerts for Joomla releases, tips and tricks and extension updates.