I just checked, was missed the part of clean the image URL but even without it the tag show up well.
Correction:
Correction:
Code:
use Joomla\CMS\Factory; // this one can be already in your overrideuse Joomla\CMS\Uri\Uri; // this one can be already in your overrideuse Joomla\CMS\HTML\HTMLHelper; // this one can be already in your override$document = Factory::getApplication()->getDocument();$images = json_decode($this->item->images);$ogImg = !empty($images->image_fulltext) ? $images->image_fulltext : $images->image_intro;if ( !empty($ogImg) ) { $ogImg = HTMLHelper::_('cleanImageURL', $ogImg); $document->addCustomTag('<meta property="og:image" content="' . Uri::base() . $this->escape($ogImg->url) . '" />');}
Statistics: Posted by carlitorweb — Fri May 10, 2024 6:26 pm