diff --git a/administrator/components/com_finder/config.xml b/administrator/components/com_finder/config.xml index e052a804246ba..93919b7a4cf3a 100644 --- a/administrator/components/com_finder/config.xml +++ b/administrator/components/com_finder/config.xml @@ -38,6 +38,37 @@ showon="show_description:1" /> + + + + + + + + + + + + + + + + + + + + + getIdentity(); $show_description = $this->params->get('show_description', 1); @@ -48,6 +49,22 @@ $description = HTMLHelper::_('string.truncate', StringHelper::substr($full_description, $start), $desc_length, true); } +$showImage = $this->params->get('show_image', 0); + +if ($showImage && !empty($this->result->imageUrl)) +{ + $imageclass = $this->params->get('image_class', ''); + $image = HTMLHelper::cleanImageURL($this->result->imageUrl); + $extraAttr = ''; + + // Set lazyloading only for images which have width and height attributes + if ((isset($image->attributes['width']) && (int) $image->attributes['width'] > 0) + && (isset($image->attributes['height']) && (int) $image->attributes['height'] > 0)) + { + $extraAttr = ArrayHelper::toString($image->attributes) . ' loading="lazy"'; + } +} + $icon = ''; if (!empty($this->result->mime)) : $icon = ' '; @@ -59,6 +76,23 @@ endif; ?>
  • + +
    + params->get('link_image') && $this->result->route) : ?> + + <?php echo htmlspecialchars($this->result->imageAlt, ENT_COMPAT, 'UTF-8'); ?> + /> + + + <?php echo htmlspecialchars($this->result->imageAlt, ENT_COMPAT, 'UTF-8'); ?> + /> + +
    +

    result->route) : ?> title = $title; } + $images = $item->images ? json_decode($item->images) : false; + + // Add the image. + if ($images && !empty($images->image_intro)) + { + $item->imageUrl = $images->image_intro; + $item->imageAlt = $images->image_intro_alt ?? ''; + } + // Add the meta author. $item->metaauthor = $item->metadata->get('author');