This project is read-only.

BlogEngine / Feedburner compatibility issue

Topics: Business Logic Layer
Jun 13, 2014 at 5:35 PM
We are using BE 2.9.1 and are having an issue with some images appearing as broken in the Syndication output used by Feedburner. The problem is that most of the image URLs are written out as root absolute (/image.axd?picture=...), but not fully abdolute (

Is there a setting I am missing somewhere that will out these image URLs as absolute? All the links to the posts themselves are outputted as absolute URLs.


Jun 13, 2014 at 7:25 PM
You can try this code saving it as extension (FeedburnerImgFixer.cs):
using BlogEngine.Core;
using BlogEngine.Core.Web.Controls;

[Extension("Converts image path from relative to absolute URL for FeedBurner", "1.0", "BlogEngine.NET")]
public class FeedburnerImgFixer
    static FeedburnerImgFixer()
        Post.Serving += Post_Serving;

    static void Post_Serving(object sender, ServingEventArgs e)
        if (e.Location == ServingLocation.Feed)
            var relativePattern = "src=\"" + Blog.CurrentInstance.RelativeWebRoot;
            var absolutePattern = "src=\"" + Blog.CurrentInstance.AbsoluteWebRoot;

            e.Body = e.Body.Replace(relativePattern, absolutePattern);
This should replace any "src" references from relative to absolute in feeds only.
You can check if it works by going to "/syndication.axd".
For FeedBurner to pick it up will take some time, they cache and sync on schedule.
Jun 13, 2014 at 8:16 PM

Awesome, thanks! I will give it a try.

Jun 15, 2014 at 7:16 PM

This worked beautifully, thanks!