12/4/08 10:16AM

Media RSS continues to get consumed in more and more places, from sites like FriendFeed to embeddable widgets like this slide show based on the Google AJAX Feed API.

So I thought I'd use it to add thumbnails to my site's Atom feed. It turned out to be surprisingly easy -- I just had to include a <media:thumbnail> element in each <entry> with an associated image.

For example, this post will appear something like this in the feed:

 <title>Adding Media RSS thumbnails to an Atom feed</title>
 <link href="http://www.tomstocky.com/blog/adding-mediarss-to-atom"
   rel="alternate" type="text/html" />
 <content type="xhtml" xml:base="http://www.tomstocky.com/">
  <div xmlns="http://www.w3.org/1999/xhtml">
   ... content ...
 <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/"
   height="150" width="300" />

One thing I wasn't able to track down were the size constraints for these thumbnails. I assume that consumers of Media RSS have maximum widths and heights in mind for these images, but I couldn't find anything definitive. Let me know if you happen to be aware of a max thumbnail size ...