From 9f5d8e983e3b1663967ae15a3ad8cf39384bf2d6 Mon Sep 17 00:00:00 2001 From: Eliastik <26941242+Eliastik@users.noreply.github.com> Date: Fri, 16 Feb 2024 22:59:24 +0100 Subject: [PATCH] Add enclosure image on RSS field --- system/includes/functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system/includes/functions.php b/system/includes/functions.php index 8b1cde2..10ec935 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -2741,6 +2741,10 @@ function generate_rss($posts, $data = null) ->description($body) ->url($p->url) ->appendTo($channel); + + if ($p->image !== null) { + $item->enclosure($p->image, 0, "image/" . end(explode('.', $p->image))); + } } }