From 8a62c6a915235ad69fdf025a67c787d3d71bf768 Mon Sep 17 00:00:00 2001
From: Fabio Manganiello <info@fabiomanganiello.com>
Date: Tue, 26 Jan 2021 01:55:46 +0100
Subject: [PATCH] Fixed RSS item images

---
 app/__init__.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/app/__init__.py b/app/__init__.py
index c2c768e..988b9ca 100644
--- a/app/__init__.py
+++ b/app/__init__.py
@@ -107,7 +107,7 @@ def rss_route():
     pages = get_pages(with_content=True)
 
     return Response('''<?xml version="1.0" encoding="UTF-8" ?>
-<rss version="2.0">
+<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/>
     <channel>
         <title>Platypush blog feeds</title> 
         <link>http://blog.platypush.tech</link>
@@ -132,15 +132,12 @@ def rss_route():
                 <link>https://blog.platypush.tech{link}</link>
                 <pubDate>{published}</pubDate>
                 <description><![CDATA[{content}]]></description>
-                <image>
-                    <url>https://blog.platypush.tech/img{image}</url>
-                </image>
+                <media:content medium="image" url="https://blog.platypush.tech/img{image}" width="200" height="150" />
             </item>
             '''.format(
                 title=page.get('title', '[No Title]'),
                 link=page.get('uri', ''),
                 published=page['published'].strftime('%a, %d %b %Y %H:%M:%S GMT') if 'published' in page else '',
-                # description=page.get('description', ''),
                 content=page.get('content', ''),
                 image=page.get('image', ''),
             )