Add enclosure image on RSS field

This commit is contained in:
Eliastik 2024-02-16 22:59:24 +01:00
commit 9f5d8e983e
No known key found for this signature in database
GPG key ID: 6A29B411D099C5CF

View file

@ -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)));
}
}
}