A Single Article

Read it, comment, and share it with your friends

RSS and images

Posted August 3 in Asides.

I just realized today that the images in my RSS feed were not directly linked and therefore not showing up in feed readers. I went ahead and fixed the RSS feed so that the images show. You should be able to see my cool ghetto pic now. Let me know if there are any other problems.


Get a Trackback link

2 Comments

Responses to my article
  1. Andy Brudtkuhl August 8, 2006

    After you mentioned this I realized our feed was not including images either. What did you do to fix that?

  2. C Montoya August 9, 2006

    I added the following code after the <?php opener in wp-rss2.php:

    function fix_code($buffer) {
    return (str_replace("src='/wp-content", "src='http://www.christianmontoya.com/wp-content", $buffer));
    }
    ob_start("fix_code");

    My whole problem stemmed from my relative linking of all my images; I just replaced those with absolute links in the RSS feed. If you ask me, this shouldn’t be my job; RSS readers should do the necessary content negotiation to replace relative links with absolutes, or at least Feedburner should do this for me, or at least Wordpress should do this out of the box. Oh well.

Leave a comment

Share your thoughts with the world

You can use Markdown, or you can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Please keep comments respectful and on topic.

This form is guarded by Akismet, so don't waste your time trying to submit spam. It won't work. Ever.





Stay on top of new updates at this site: Subscribe to the Feed!