HubSpot Ideas

seancrater

Blog RSS Featured Image

Hi there,

 

I was wondering if there is a reason why the RSS feeds for blogs don't include the featured image for a post? We're using the RSS feed to generate emails using Digesto and it's become a pain point that we can't access the images that we upload for each post.

 

I'd imagine it could print out something like this, probably fairly easy to add to the feed as well because I'm guessing Hubspot has it developed in a way they can access the post data as an object.

 

<image>http://image-source-here.jpg</image>

Thanks!

Sean

40件のコメント
jlamb2
投稿者

 

 

Sure @suryast - it's an external site but maybe someone will find it useful.

 

I looked at a hubspot feed (blog.hubspot.com/rss.xml) and made an identical feed on my site:

 

hubspot's bloghubspot's blogmy markupmy markup

 

custom rss feed output to match hubspotcustom rss feed output to match hubspot

 

 

Joe_list
参加者

Sorry to say @jlamb2's solution didn't work for me. But for those who are using WordPress, I found a solution. The HubL template code is capable of picking up the comments link from the RSS feed. So I changed our RSS feed to use the url to the featured image instead of the comments. This solution is good only if you don't care that the comments links in your feed link to the featured image instead of the comments.

 

You can insert this code into your theme's functions.php file:

 

add_action('comments_link_feed', 'change_comments_link_feed');
function change_comments_link_feed() {
  global $post;
  if(has_post_thumbnail($post->ID)):
    $thumbnail = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
    return($thumbnail);
  endif;
}

Then in your email template, you can use post.comment_url to get the image url:

<img src="{{ post.comment_url }}" width="100%">

 

jmahan
参加者

HubSpot, are you going to chime in here? It's pretty crazy that you're not adding functionality for featured images in RSS feed emails. Users have been asking for this for YEARS.

jessi32
メンバー

Has there been a solution to this? We would really like to our featured image to pull through into the RSS feed on our WordPress site. It is frustrating that this detail, which seems to be extremely desired and popular, has not been addressed. 

BradyGTA
メンバー

Has this been added yet?

ステータスに更新: Not Currently Planned
Snaedis
HubSpot製品開発チーム

Hello everyone,

 

The exclusion of the featured image in the RSS feed is deliberate because the concept of a featured image isn't part of the RSS feed standard (see http://www.rssboard.org/rss-profile for documentation of the standard), so when the feed is external, there's no universal way to identify the featured image for each post in an RSS feed. There seem to be some common ways people include featured images in the content:encoded element in their Wordpress (or other CMS') blog RSS feeds, but it can vary from blog to blog. 

 

For now and the foreseeable future, we're going to stick with the RSS feed standard of not including the featured image in RSS feeds. We're always re-evaluting these types of product decisions based on the feedback we get from our customers, so if you disagree with this decision please comment here and let us know! 

 

- Snaedis 

SaltyBabe
メンバー

Hi Hubspot and Snaedis,

This is totally unacceptable. This feature comes standard in many competing ESPs, many of which are far less sophisticated than Hubspot. We spent thousands of dollars migrating over to Hubspot after the sales agent assured us that there was a seamless RSS to newsletter automation. This small feature is literally the only roadblock in fully automating our content - what you are saying is that we have to manually insert every image into every newsletter we send from the content on our website - the labor it will cost to do this grunt work is simply not worth it - we could save the money and move over to another service! Please advise how you will be fixing this issue, or else work that you will work with our developer one-on-one to create a solution that is viable for us to use moving forward. Thank you!!

claromentis
メンバー

I agree that not including this feature is a huge oversight, and something that should be an obvious feature out of the box. 

 

@SaltyBabe I don't know if it helps at all, but something we've done is add a generic image next to every blog in our weekly newsletter template. It's definitely not ideal, but you only need to do it once and it does add a little interest/colour to the emails (which would otherwise just be full of text because of the RSS/image oversight - again, not ideal).

Joe_list
参加者

There is no need for the featured image to be part of the rss standard to add it. RSS is an extension of XML, like HTML. The "X" in XML stands for "Extensible."

 

You can build an HTML page with a <hubspot> element on your website, if you wanted to. Create a style to tell the browser how to render it, and it's just fine. <hubspot> isn't a standard HTML element, but browsers and reader devices will handle it well enough. It doesn't break anything.

 

In the same respect, RSS is a standard of the set of elements that all RSS readers should understand how to handle. Any nonstandard elements in an RSS feed can easily be skipped over by readers that don't understand how to handle those elements. Part of the beauty of the standard is that it's extensible -- there is no problem in building something on top of that standard.

 

To include a <hubspot:featured-image> element in an RSS feed will break nothing. But for those of us who are savvy enough to know what to do with it, the featured image element is hugely valuable and saves your customers a lot of time and frustration. That's not to mention how helpful it would be for developers looking to extend HubSpot's platform.

marianberry
投稿者

@Snaedis ,

 

Chiming in here as I'm now two years deep, but have had three clients need this feature (WP blog site, no ability to easily pull in featured image.)

 

It would be one thing if HS wasn't the royalty of blogging and content marketing, but since you guys are such an industry leader it is quite dissapointing to not have a professional looking RSS email feed (it simply looks wrong without the featured image.) So again, letting you know this has cost me and my clients lots of dough.

ステータスに更新: Not Currently Planned
Snaedis
HubSpot製品開発チーム

Hi @marianberry , I'm sorry this has been costly for your clients 😣

 

@Joe_list Of course you can use any element you want to in HTML -- but here we're talking about people being unable to use the email tool in HubSpot to automatically pull in their featured blog image from WordPress (or similar). It's precisely because you can use whatever HTML you want to that we can't pull in the image reliably. For the email tool to be able to do that, you can't have the featured image element named whatever you want - the tool won't know what to look for. That's why it does actually need to be part of the RSS standard in order for us to include it, because as it is (not part of the standard), there's no way to reliably pull in the featured image from blogs hosted outside of HubSpot. 

 

For anyone looking for a solution, I've heard customers have had success with this WordPress plugin. 

jcp
メンバー

Looking for this as well. As an experienced developer this shouldn't be that hard for HS to solve. 

benvanlooy
トップ投稿者 | Platinum Partner

@Snaedis "The exclusion of the featured image in the RSS feed is deliberate because the concept of a featured image isn't part of the RSS feed standard".

 

This is a very weak argument, if Hubspot would only code following standards, I'm sure many features that are here today wouldn't be there. Instead of hiding behind standards, Hubspot should look at most use cases, as you can see in this topic. It's only logical to add a featured image as seperate node in an RSS feed.

 

We spent years begging for blog-translations possiblities (while this was possible for landingpages, but not for blogs for years.. for some unknown reason), I guess we'll spend years begging for this also.

 

The only way to get around this is to custom program it, searching inside the description node & taking out the featured image's image source. It'd do-able but costs our clients more for something that is just expected to work out of the box.

 

This isn't 1999 anymore, we like to use images on our websites 😉

marianberry
投稿者

@Snaedis -

First off, thank you so so much for pointing me to that WP plugin. I thought for sure I had replied back to let you know that I was able to get it to work and then style the feed so now it looks great.

@benvanlooy  -

The WP plug @Snaedis  references above is a great substitute while we wait whether or not HS includes the featured image in the future updates to their RSS feed code. Reach out if I can help you, happy to save someone else time if I can.

benvanlooy
トップ投稿者 | Platinum Partner

thanks @marianberry - but about the plugin @Snaedis pointed out:

 

Yes, it will help you with your basic RSS feed. But as the featured image is not a seperate node, the free version of that plugin will not suffice, you'll need the premium version (and as Hubspot is pricy as it is, it's a bit overkill to pay extra: "Feature Body Image: No featured photos set? No problem. Use the first photo from the body of posts." => Premium upgrade)".

 

Moreover, many of us programmers don't want to use extra plugins where it's not really neccesary, as a wp-developer I use as little plugins as possible, think I use about 3 max. If you use too many which you're not familiar with, they are basically security risks & the more you have, the slower your site will get.

 

In the meantime I've programmed a solution myself 😉

marianberry
投稿者

@benvanlooy , all great info to hear (especially as a non-programmer.)  It is working for my purposes at the moment, but thank you for taking the time to tell me the potential ramifications and why from a development standpoint it is less than ideal. Let's keep advocating for it.

NSmith1080
メンバー | Elite Partner

Hi all,

 

Client of ours is using Webflow and we are running into the same issue. Does anyone have a work around for webflow and pulling in a featured or thumbnail image into the feed? I am not a developer but from everything I see, images are pretty standard in RSS feeds. 

 

This seems like a big issue across the board and with HubSpot. Many HubSpot clients use Webflow and this would be a great opportunity to close some gaps. 

JDay9
メンバー

Please, please, please find a way to allow featured images to be pulled from the RSS feed! I'm hesitant to set up a monthly email newsletter because it just looks like a bunch of text cramped together.

WalterDeRoeck
メンバー

Hi, we also need this functionality urgently.  I do not understand why it is taking years to implement this. 

squatchcreative
投稿者

In my particular Hubspot blog, I noticed it included the featured image in the description tag of each item in the RSS feed like this:

 

 

<item>
<title>Title Here</title>
<link>https://yourblogpost.com/url-goes-right-here</link>
<description><div class="hs-featured-image-wrapper"> <a href="https://yourblogpost.com/url-goes-right-here" title="" class="hs-featured-image-link"> <img src="https://yourblogpost.com/hubfs/photo.png" alt="" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p><span>Text in here</span></p></description>
<pubDate>Jan 1, 1970</pubDate>
<guid>https://yourblogpost.com/url-goes-right-here</guid>
<dc:date>1970-01-01T12:00:00Z</dc:date>
<dc:creator>Author</dc:creator>
</item>

 

 

In this case, I have a Wordpress site and a Hubspot blog, and I want to call some of the most recent Hubspot blogs within the Wordpress site on the home page.  This is the script I used to loop through the RSS feed, get all of the info I wanted, including the featured image tag without all of the markup included...

 

 

<?php 
	$i = 1;
	$count = 5; //HOW MANY POSTS DO YOU WANT? 
	$doc = new DOMDocument();
	$doc->load('https://yourbloghere.com/rss.xml'); // PUT YOUR RSS FEED HERE
	foreach ($doc->getElementsByTagName('item') as $node) {
		$post_title = $node->getElementsByTagName('title')->item(0)->nodeValue;
		$post_description = strip_tags($node->getElementsByTagName('description')->item(0)->nodeValue);
		$post_link = $node->getElementsByTagName('link')->item(0)->nodeValue;
		$post_date = $node->getElementsByTagName('pubDate')->item(0)->nodeValue;
		$post_image = $node->getElementsByTagName('description')->item(0)->nodeValue;
		$image_content = new DOMDocument();
		$image_content->loadHTML($post_image);
		$xpath = new DOMXPath($image_content);
		$src=$xpath->evaluate("string(//img/@src)");
	?>
		<article>
			<img src="<?php echo $src; ?>" alt="<?php echo $post_title; ?>" loading="lazy" />
			<h2><?php echo $post_title; ?></h2>
			<info><?php echo date('m.j.y',strtotime($post_date)); ?></info>
			<excerpt><?php echo $post_description; ?></excerpt>
			<a href="<?php echo $post_link; ?>" title="<?php echo $post_title; ?>">Read More</a>
		</article>
	<?php $i++;
		if($i > $count) break;
	}
?>

 

 

You NEED to customize this for your particular RSS feed.  I tried to comment where you need to do that. 

 

I should also note that using PHP's `domDocument()` function is relatively taxing, so use with caution.

 

I also have no idea if putting the featured image in the desciption tag of the XML is default now or if there is a setting you need to do in order to include this.  Someone from Hubspot would speak to this better.  All of the blogs I work on and checked have this included, so I assume it is default.