Book Sale! Code WP2025 takes 20% OFF our Pro Plugins & Books »
Web Dev + WordPress + Security

Feed your Image via Atom or RSS

This quick tutorial explains how to add images to both Atom and RSS feeds. Although both formats allow for image-inclusion, feed-reader support for image-display is currently quite limited in most browsers and applications. Hopefully, that will change in the near future..

Images for Atom Feeds

Images included within Atom feeds must have a ratio of either 1:1 or 2:1. There are no other restrictions as to file type or size. Use the <icon> XML element for URL’s targeting 1:1 images. Otherwise, use the <logo> XML element for URL’s targeting 2:1 images. Either element should be placed in the <feed> element:

<feed>
	<icon>http://domain.tld/path/icon.ico</icon>
	<logo>http://domain.tld/path/logo.gif</logo>
</feed>

Images for RSS Feeds

RSS supports images with a maximum width of 144px and maximum height of 400px. If no dimensions are specified, 31px will be the default value for width and 88px the default value for height. Icons (.ico) are currently not supported in RSS specifications. In RSS, it is possible to include additional image data via specified XML elements. Here is a complete example, commented with explanations for each image element:

<channel>
	<image>
		<url>http://domain.tld/path/site_logo.jpg</url> // *required! - the URL of the image
		<title>The alt attribute of the image</title>   // *required! - the image alt attribute
		<link>http://domain.tld/my_blog/</link>         // *required! - the URL of the website
		<width>111</width>                              // the image width
		<height>33</height>                             // the image height
		<description>An amazing website</description>   // the link title attribute
	</image>
</channel>

Customize as desired!

About the Author
Jeff Starr = Web Developer. Book Author. Secretly Important.
Digging Into WordPress: Take your WordPress skills to the next level.
Welcome
Perishable Press is operated by Jeff Starr, a professional web developer and book author with two decades of experience. Here you will find posts about web development, WordPress, security, and more »
Digging Into WordPress: Take your WordPress skills to the next level.
Thoughts
Finishing up the pro version of Head Meta Data plugin, launch planned this month.
Finally finished my ultimate block list to stop AI bots :) Blocks over 100 AI bots!
After 10 years working late at night, my schedule has changed. I am now a “morning person”, starting my day at 6am or earlier.
Nice update for Wutsearch search engine launchpad. Now with 19 engines including Luxxle AI-powered search.
New version of 8G Firewall (v1.4) now available for download :)
Wishing everyone a prosperous and bright New Year!
I disabled AI in Google search results. It was making me lazy.
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.