diff --git a/components/com_content/src/View/Category/FeedView.php b/components/com_content/src/View/Category/FeedView.php index 72c1cb9febc28..364827b2edf37 100644 --- a/components/com_content/src/View/Category/FeedView.php +++ b/components/com_content/src/View/Category/FeedView.php @@ -53,9 +53,12 @@ protected function reconcileNames($item) $item->description = ''; $obj = json_decode($item->images); + // Set feed image to image_intro or if that's empty, to image_fulltext if (!empty($obj->image_intro)) { $item->description = '

' . HTMLHelper::_('image', $obj->image_intro, $obj->image_intro_alt) . '

'; - } + } elseif (!empty($obj->image_fulltext)) { + $item->description = '

' . HTMLHelper::_('image', $obj->image_fulltext, $obj->image_fulltext_alt) . '

'; + } $item->description .= ($params->get('feed_summary', 0) ? $item->introtext . $item->fulltext : $item->introtext); diff --git a/components/com_content/src/View/Featured/FeedView.php b/components/com_content/src/View/Featured/FeedView.php index 9f8e7a38b6d25..bd74c8c8e4b4c 100644 --- a/components/com_content/src/View/Featured/FeedView.php +++ b/components/com_content/src/View/Featured/FeedView.php @@ -66,8 +66,11 @@ public function display($tpl = null) $description = ''; $obj = json_decode($row->images); + // Set feed image to image_intro or if that's empty, to image_fulltext if (!empty($obj->image_intro)) { $description = '

' . HTMLHelper::_('image', $obj->image_intro, $obj->image_intro_alt) . '

'; + } elseif (!empty($obj->image_fulltext)) { + $description = '

' . HTMLHelper::_('image', $obj->image_fulltext, $obj->image_fulltext_alt) . '

'; } $description .= ($params->get('feed_summary', 0) ? $row->introtext . $row->fulltext : $row->introtext);