Feed Image Wordpress Plugin


After reading the article Adding a logo to your WordPress RSS Feed on onenaught.com I decided it was times to write another plugin. the solution of adding a function to WordPress' build in functions.php file wasn't optimal for me.

Check this plugin in action on the Ninedays Blog RSS Feed

Feed Image

This is the first plugin I've written that has an options page, thanks to this article Adding options to WordPress plugins.

Just a few things to customize in the option page (Options > Feed Image) updating the path to your ico file as well as your logo.

Feed Image Options Page

The icon and logo must reside within the domain your blog is installed, to prevent any potential hot linking. You'll see the results in your RSS, RSS2 as well as your Atom feed.

Download

Changelog

  • 1.02 - Updated to add the image to RSS as well as RSS2 and Atom Feeds (thanks Sophia!) (May 28, 2008)
  • 1.01 - Updated some sloppy naming conventions and conditional statements (thanks Ragaskar!) (January 7, 2008)
  • 1.0 - Created & released (December 2, 2007)

Requirements

  • Tested on WordPress 2.3 and above

Installation

Check out the WordPress documentation on Installing Plugins.

Roadmap

In the future I plan on adding the ability to upload images, and adding a field to allow for image attachments for each post like the Yahoo! News RSS feed. I would also like to have the script measure the image size automatically.

Inspired By

  1. Necessity, the greatest inspiration of all
  2. Adding a logo to your WordPress RSS Feed
  3. Plugin development really helps me understand how the core of Wordpress works and insight into well maintained web applications is a great learning experience.

Popularity: 50% [?]


Write a Comment

Take a moment to comment and tell us what you think. Some basic HTML is allowed for formatting.

Trackbacks & Pingbacks

Adding a logo to your WordPress RSS Feed — onenaught.com

[...] Update December 8, 2007: It looks like this article inspired Terri Ann at NineDays Blog to create a WordPress plugin to do what this article describes, for you. [...]

Pingedback: 8 months ago

the b-world

Feed Verbesserung... Seit heute ist bei mir das WordPress Plugin “Feed Image” von Terri Ann Swallow im Einsatz. Dieses Plugin ermöglicht es mir nun alle meine Feed-Leser mit einem schicken Logo im Feed Header zu erfreuen. Viel Spass damit.

Trackedback: 3 months ago

עולם הפידים- rss » ITbananas

[...] תזכורת רסס בסוף כל פוסט: subscribe-remind הוספת איקון לפידים: feed-image | [...]

Pingedback: 2 months ago

Reader Comments

Nicely done, however, you need to fix the following conditional branch:

if(isset($_REQUEST['feed_logo'])){
    $logo_filename = $_REQUEST['feed_logo'];
    update_option('feed_logo', $logo_filename);
}

should read

if(isset($_REQUEST['feed_image'])){
    $logo_filename = $_REQUEST['feed_image'];
    update_option('feed_logo', $logo_filename);
}

Alternatively, you could change

    <label for="feed_icon"><strong>Feed Logo:</strong></label> 
        <?php echo get_bloginfo('url'); ?>/<input type name="feed_image" value="<?php echo $default_logo; ?>" size="35" />
        <small><em>Use an image file (jpg, png, gif)</em></small>

to

    <label for="feed_icon"><strong>Feed Logo:</strong></label> 
        <?php echo get_bloginfo('url'); ?>/<input type name="feed_logo" value="<?php echo $default_logo; ?>" size="35" />
        <small><em>Use an image file (jpg, png, gif)</em></small>

which is probably preferable for troubleshooting reasons, as you keep the names consistent.

Also, you might consider dropping the auto-path and just pre-popping a text-field with the current wordpress root, so users can put in a full URL instead of just a path under the wordpress root. My wordpress root is not the same as my web root, and for organizational reasons, it sometimes makes more sense to not dupe items into my wordpress install dir.

Thanks ragaskar, I've updated the form fields and double checked all my other naming conventions for consistency!

I updated the feed image options and am not able to tell if it worked. Any suggestions? I clicked on my rss feed, but did not see any images.

@Sophia - I see it in your atom feed and your RSS2 Feed but not your RSS feed I'll have to look into this a little later this evening. I really haven't touched this plugin for a while so I'm surprised this hasn't been brought to my attention yet.

In the meanwhile why not switch your RSS to RSS2, it is the newer standard for RSS I believe, honestly RSS isn't my strongest suit!

Hi Terri,

I've got some suggestions for this plugin, to clean up the code and reduce on database action etc. Could you drop me a line? :)

Cheers, Joost