Latest version: 1.2 – Released July 4th, 2010

  • Bugfix for the Get The Image plugin integration.

Description

This plugin simply adds your post thumbnails to your feed as RSS enclosures. Nothing else to it. If you don't use thumbnails or you don't know what enclosures are or why you might want them, then this probably isn't for you.

The plugin supports the Post Thumbnail feature built into WordPress and the Get The Image plugin by Justin Tadlock.

Installation

  1. Unzip the ZIP file and drop the folder straight into your wp-content/plugins/ directory.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. View your feed (you might need to do a hard refresh - ctrl+reload) and any posts that have a thumbnail defined will have an enclosure containing a link to the thumbnail.

Download

This plugin requires WordPress version 2.9 or later.

Version 1.2 ZIP file from downloads.wordpress.org

Any comments, questions, queries, suggestions, complaints, etc, please leave a comment!

33 Comments

  1. Nathan Cain - MandarinMnemonics.com Says:

    Would you go ahead and tell me what an enclosure is and why I might want this plugin?

  2. John Blackbourn Says:

    An enclosure is a way of including media such as photos, videos and audio in entries in an RSS feed. It simply references the URL of the associated media item.

    RSS enclosures may be displayed by RSS readers and any other clients that consume your feed. The main reason I created this plugin was to allow a feed of a blog to be fetched and displayed on an external site and to include the specified post thumbnail along with it.

  3. John (Human3rror) Says:

    a screenshot would be helpful.

  4. John Blackbourn Says:

    A screenshot of what?

  5. Max Says:

    Hi John, your plugin was exactly what I was looking for… But have a Q: Is it possible to, instead using a pic of the post that has been assigned as thumbnail, to modify your code or have the option to use as thumbnails in RSS Feed the FIRST image of every post? This because I have more than 400 posts that show thumbs in my theme with “Get The Image” plugin collecting the first image founded… So, naturally your plugin doesn’t work in my case… It’s also hard to edit all of them assigning an image as thumb… Thanks!

  6. John Blackbourn Says:

    Hi Max, I had planned on supporting the Get The Image plugin as I use it myself on some sites, but I haven’t got around to it. Check back next week and I may have it done.

  7. Max Says:

    Thanks John! Will be a keypoint for me… I also think that in this way your plugin will maybe be the only one to do this! I’ll stay tuned…

  8. John Blackbourn Says:

    Version 1.1 – Support for the Get The Image plugin.

  9. Max Says:

    THX JOHN! And so fast to find the sol! I have also informed the theme’s developer! Ciao!

  10. Josh Says:

    John,

    Is there a way to make the image viewable without clicking on the link?

    Sorry if this is a ridiculous question, but I’m rather new at this.

    Thanks!

  11. John Blackbourn Says:

    You’re in luck Josh. Check out my as-yet-unreleased plugin Feed Images (right-click and save it). It adds an <img> tag to the beginning of each post with a thumbnail. Give it a whirl.

  12. Josh Says:

    Thanks for the quick reply! Sorry if this is a dumb question, but where to I put this code?

  13. John Blackbourn Says:

    Hey Josh, the code is a WordPress plugin. Save the file as a .php file, upload it to your plugins directory in WordPress and activate it as usual.

  14. Josh Says:

    Hey John,

    Finally got a chance to do this, thanks for the info. However, when I put the file in the plugins directory it did not show up to activate. I put the code into a folder called feed images and saved the php file the same.

    Thanks again for your help.

    Josh

  15. Brad Mahaffey Says:

    Hey John, thanks for the plugins. I was hoping for the functionality of the Feed Images plugin you mentioned in the comments, although it seems to break feedburner.

    Warning: Cannot modify header information – headers already sent by (output started at /home/ipadapps/public_html/wp-content/plugins/feed-images/feed-images.php:46) in /home/ipadapps/public_html/wp-content/plugins/feedburner_feedsmith_plugin_2.3/FeedBurner_FeedSmith_Plugin.php on line 113

    I know it’s unreleased, thought I would let you know anyway though. thanks again.

  16. John Blackbourn Says:

    Hi Brad, it sounds like your problem is that you have either a blank line or a space after the closing “?>” tag at the end of the feed-images.php file. Have a look, and if so remove it and it’ll stop that error showing up. John.

  17. Talina of Harvest of Daily Life Says:

    Silly question…So is this using the “thumbnail” custom field? I thought it was but upon installing and activating I am not seeing any thumbnails :-/
    Must be doing something wrong.

  18. John Blackbourn Says:

    Talina: If you have the Get The Image plugin installed, it uses the thumbnail chosen by that plugin – and I believe this does include the ‘thumbnail’ custom field – and if not it uses the thumbnail you chose with the built-in Post Thumbnail functionality in WordPress (if your theme supports it).

  19. Dominic Says:

    This plugin seems to crash Internet Explorer 8 on my side. Tried on three different terminals. When attempting to refresh feed to see thumbails, IE crashes. Works fine in other browers with RSS support.

    Any idea how to correct this?

  20. John Blackbourn Says:

    Dominic: Got a URL for your feed I can see?

  21. Dominic Says:

    John,

    Sure thing. Take a look @ http://nufantech.com/feed/

    Your plugin is installed. Try a forced refresh and watch IE crash :(

    No problem in Firefox, except it doesn’t display the image just provides a link for it. I believe this is inherit to Firefox though.

  22. John Blackbourn Says:

    Dominic: Tested in IE 7, IE 8 and Firefox 3, no problems here.

  23. Dominic Says:

    Story of my life. I’ll take your word for it. Maybe I have something installed that’s screwing it up. Thanks for your help.

  24. Dominic Says:

    John,

    When you test are you actually seeing the thumbnail, or just the filename and a link? I’ve got it working in IE, but like Firefox, it just displays the filename and a link.

    I could modify the plugin to create a new but I’m fairly sure this will cause some compatibility issues with the feed.

    Your thoughts?

  25. Dominic Says:

    John,

    Problem seems to be encclosure related. Thinking this is the enclosure for the thumbnail.

    •line 38, column 2: Missing enclosure attribute: length (8 occurrences) [help]

    <enclosure url="http://nufantech.com/wp-content/uploads/2010/06/landingthu … ^•line 38, column 2: Missing enclosure attribute: type (8 occurrences) [help]

    <enclosure url="http://nufantech.com/wp-content/uploads/2010/06/landingthu … ^

  26. Howard Says:

    John,
    I have created a custom rss feed for a third party website to display our blog content. They requested for an image to be attached to each post within an enclosure, so your plugin was perfect for including the post thumbnail in each post.

    However, when I checked the code in Firefox, it is not including the file type in the enclosure, eg. type=”image/jpg” at the end of the enclosure tag.

    Is it your plugin that is failing to add the file type, or the ‘rss_enclosure’ function in WordPress? And can you suggest how to add this?
    My custom feed is here: http://scubapix.com/blog/?feed=banzai

    Thanks, H

  27. John Blackbourn Says:

    Howard:

    Yeah my plugin doesn’t add the file type attribute to the enclosure.

    The plugin doesn’t use WordPress’ rss_enclosure function as my plugin was built to work with two separate thumbnail plugins in addition to the built-in thumbnail system in WordPress meaning that the file type of the thumbnail isn’t always available.

    I’m busy at the moment but if I find the time in the next week or so I’ll look at adding in the file type (and file size as the ‘length’ attribute) to the enclosure tag.

  28. Howard Says:

    Ah – Thanks John. I’ll look forward to you adding the file type and length attributes in the near future. This will also help the validation errors, which are mentioned in a previous comment.

    Is there a quick workaround in the meantime? ie how can I just hard-code the file type as exactly, type=”image/jpg” for now, as I am only using jpgs at the moment?

    I ask as I need to fix this up before tomorrow. The site our feed is providing content for is launching tomorrow and the file type attribute is something they are insistent on. Without it, our content will not be included, and my boss will not be happy…

    I have had a go, but my knowledge of php is not sufficient. I would really appreciate a workaround… Thanks.

  29. John Blackbourn Says:

    Howard: Take a look in the plugin. Near the bottom you’ll see where the enclosure tag is echoed out. Just add the type attribute before the url attribute and you’ll be sorted.

  30. Howard Says:

    Thanks John – work around all sorted. It’s easy when you know how…!

  31. phazei Says:

    I made some cool changes, but these comments blow and won’t let me post them, sigh.

  32. phazei Says:

    Precondition Failed

    The precondition on the request for the URL /wordpress-plugin-feed-thumbnails/ evaluated to false.

    I get that even if I html encode the code. Email me.

  33. John Blackbourn Says:

    Hey Phazei, stick the code in a pastebin and put the link in a comment.

Leave a Comment