title: Add image field to XML sitemap in Django
body: <p>Google recognizes an <code>&lt;image&gt;</code> tag for XML sitemaps (<a href="http://support.google.com/webmasters/bin/answer.py?hl=en&amp;answer=178636" rel="noreferrer">http://support.google.com/webmasters/bin/answer.py?hl=en&amp;answer=178636</a>), and I would like to include an image attribute into my sitemaps. </p>
  
  <p>So, something like this is needed to get the cover_image and then loaded into the xml file:</p>
  
  <pre><code>for article in articles:
          print article.cover_image
  </code></pre>
  
  <p>I'd also need <code>article.title</code> loaded too for the <code>&lt;image:title&gt;</code> tag.</p>
  
  <p>I've Googled and searched Stack Overflow for an example, but I surprisingly couldn't find any, so help appreciated.</p>
  
  <p>My files so far:</p>
  
  <pre><code>## sitemaps.py ##
  from django.contrib.sitemaps import Sitemap
  from myproject.article.models import Article
  
  class ArticleSitemap(Sitemap):
      priority = 1.0
  
      def items(self):
          return  Article.objects.order_by('-id').order_by('-pub_date')
  
      def lastmod(self, obj):
          return obj.pub_date
  
  ## urls.py ##
  from myproject.sitemaps import ArticleSitemap
  
  sitemaps = {
      "article": ArticleSitemap
  }
  urlpatterns += patterns ('',
      (r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})
  </code></pre>