I’ll confess a couple little secrets: I LOVE MailChimp and I LOVE WordPress.
Both are amazing tools for today’s world, beautifully crafted from A to Z. I can’t help but love a product that whenever I look for something I found it precisely where it should be, and I mean inside and outside of the product itself: Support, Documentation, Services, you name it.
One of the favorites MailChimp’s feature for every blogger must be the RSS-To-Email. It allows them to create a marketing campaign using any RSS Feed. It does all the dirty job for you: Format it, populate it, send it, track it. It just take to word AUTOMAGICALLY to a whole new level.
However, one of the problems I’ve found while using this tool with the WordPress-generated feeds, is that there’s not a build-in way to include pictures in a WordPress RSS or ATOM entry’s namespace, you have to do it manually, somehow. And I’m sure I’m not the only one that had suffered this pain.
On the other hand, I recently had to make some changes to a client’s WordPress/MailChimp installation and I almost screw it up because I was about to forgot the hacks I made for that client’s RSS and ATOM feeds. It wouldn’t be funny.
So I finally decided to make those hacks up a lil bit and make them, officially, a Free WordPress Plugin so here I am introducing you to… drums please…
What’s it? Well, as I said, it’s a Free WordPress plugin that does only two things:
However, it’s not surprise that this sort of things are not commonly solved out there. There are plenty of scenarios that needs to be addressed to make it works… out-of-the-box. And given that I do not pretend to invent anything super revolutionary, I don’t even tried to solve them.
I leave them to you… but I’ll give you a hand: The plugin calls three WordPress filters that you can use to try to solve some of your particular needs. They are:
These filters are suppousely to be used inside the functions.php of your theme or inside another plugin.
Here’s an example of its usage:
function my_path_filter($path) {
if (substr($path,0,7) == 'http://') {
$path = str_replace('http://','',$path);
}
if ( strpos($path,'/') !== false ) {
$path = substr($path,strpos($path,'/')+1);
} elseif ( strpos($path,'?') !== false ) {
$path = 'index.php'.substr($path,strpos($path,'?'));
}
return '/home/public_html/'.$path;
}
function my_url_filter($url) {
return 'http://www.williamscastillo.com/timthumb.php?src='.$url.'&h=180&w=250&zc=1';
}
function my_image_filter($image_array) {
return $image_array;
}
add_filter('wprichfeeds_image' ,'my_image_filter');
add_filter('wprichfeeds_image_path' ,'my_path_filter');
add_filter('wprichfeeds_image_url' ,'my_url_filter');
Well… That’s all for now. Any kind of comments or suggestions are welcome (well… not all, do not spam it, please).
Hi Will,
I am trying out your plugin, without any luck unfortunately.
Is it possible to display a remote thumbnail as part of a RSS feed? So if my post is http://www.zog.net/blah, and the thumbnail is http://www.foo.com/bar.jpg, should it show up? As you can see on my site, post thumbnails are enabled via the theme (it does not use TimThumb, but wordpress native thumbnails) but I take the thumbnails from another site of mine — I host all my images on smugmug.com due to bandwidth limits on my site.
I am using ‘post thumbnail’ as fetching method, and have not made any changes to functions.php.
Thanks!
-John
Hello Jhon,
Currently, there’s no fully support for remote thumbnails, sorry. There are limitations that I’m trying to bypass. I’d recommend you to use the media:content publishing method and see if it make the plugin works as expected within your web hosting.
Right now, the problem is that I have to find a reliable and efficient way to get the size and mime type of a remote image. The mime-thing is already done, but I’m still stuck with the size.
I’ve been monitoring your feed and caugh you playing
As you can see, you can use remote images… but the plugin can’t calculate its size hence returning a blank field in your feed.
Still working on it, though. Any suggestion is most welcome!
All best,
Will
Hi John,
I’ve uploaded a fixed (v1.04) that get ride of the PHP error inserted in the feed.
It still does not include the file size for remote thumbnails though.
All best,
Will
I will try that, sorry, only saw your post now. Thanks!
[...] usually) is correctly bringing in the first image. I used a plugin called wpRichFeeds (view plugin author site) which ads the enclosure information to your feed in WordPress. This is basically [...]
Hey Will,
Firstly I’d like to say this plugin sounds amazing and just what I’m looking for however I can’t seem to get it working.
I have downloaded the plugin, installing in plugins folder and set it to use a custom field, set the custom field name and the fetch type but cant get it to show images on my feed http://mysite.com/feed/rss/ It still just lists the titles etc. I have tried clear the cache.
What I’m trying to do is set up a campaign in mailchimp which uses my blogs rss feed for content including images.
would be great to get it going using this plugin. any ideas?
thanks mate
Can you please post your feed URL?
Hi,
Thanks for this great plugin. It took me some time to figure it out but now it is working (well almost). I am wordpress user and some of my posts feature just an image – no words. With those posts, I am getting two images in my mailchimp layout. What should I do to have it so that when the post is only an image it doesn’t post the actually image from the story and the one that is being pulled using wprichfeeds? Any help will be appreciated.
Hi Lorna,
I’d like to know what you find difficult in this plugin. It could help me improve it!
I’m not sure MailChimp provides the kind of customization you need here: Something like *|IF:RSSITEM:ENCLOSURE_URL|* It’s a good question/suggestion for the MailChimp Jungle or something that you can have fun testing yourself.
Anyhow, perhaps the best option for you is to create the logic in your end (WordPress’ end). wpRichFeeds has some filters that you can use to DO NOT include the feed’s image if the post is just an image, for instance.
I hope it helps!
Will
Hi Will,
For some reason when I installed the plugin, the feeds just disappeared. So, when I went to mysite.com/feed it was blank. I couldn’t figure out why. It turns out that I had to create a post for the feed with images to appear and after it was truly a piece of cake.
Ok.. so are the filters that I need to use if the post is only an image?
Hey,
The wprichfeeds_image filter seems to be the one you need.
I haven’t test it but I think something like…
I hope it helps! Let me know if it works for you.
All best,
Will
I hope I get this plugin to work, that would be so awesome! Thank you for making it.
My problem is this:
I’m using the fetching method “Thumbnail” and the publishing method “Enclosure”. It fetches the images but for some reason puts a “%20″ into the image filename, like this:
image.png%20
So instead of an image, the RSS entry has a weird file attached that can’t be opened.
I tried playing with the filters and changed the my_url_filter:
function my_url_filter($url) {
return ‘http://www.myurl.net/’.urlencode($url);
}
But it doesn’t solve the problem.
Any thoughts on this?
Hi! Mailchimp RSS-to-Email was working, but then I changed themes and now it isn’t working. So I tried your plug-in. It looks like it should be working. The feed is:
http://uventure.net/blog/feed
As an example, it shows:
TEDxCalgary – Threads of Ideas
But it doesn’t show up in MailChimp. Could it have something to do with the tag?
On the MailChimp side I have simply:
*|RSSITEMS:|*
*|RSSITEM:TITLE|*
*|RSSITEM:DATE|* | *|RSSITEM:AUTHOR|*
*|RSSITEM:IMAGE|*
*|RSSITEM:CONTENT|*
read more | comment
*|END:RSSITEMS|*
Any ideas?
Thanks!
Chris
Will
Thanks for your plugin. I appear to have installed it properly. I made the following selection in the settings:
- RSS/ATOM Logo URL: I selected my image and this displays underneath where I typed the URL, so it appears this is correct. (I don’t think I will use this function though).
- Fetching method: Post Thumbnail
- RSS Publishing Method: enclosure (1 per feed entry)
Everything else I have left blank as I don’t think I need that information. I haven’t adjusted or done anything else with the wpRichFeeds Filters Example code. It wasn’t clear what I was meant to do with this from the instructions.
I am using mailchimp and would like for you to spell out exactly what RSS merge tag I should be using. All I want to do is get the thumbnails from each post to be included as part of my enews alongside each post in my RSS email. The default for the theme I am using is as follows and would appreciate some advice on what modifications I need to make to enable the thumbnail images to show up:
*|RSSITEM:TITLE|*
*|RSSITEM:DATE|* | *|RSSITEM:AUTHOR|*
*|RSSITEM:IMAGE|*
*|RSSITEM:CONTENT_FULL|*
Thanks!
Loren
Hi,
Either:
*|RSSITEM:TITLE|*
*|RSSITEM:DATE|* | *|RSSITEM:AUTHOR|*
<img src=”*|RSSITEM:IMAGE|*”>
*|RSSITEM:CONTENT_FULL|*
Or:
*|RSSITEM:TITLE|*
*|RSSITEM:DATE|* | *|RSSITEM:AUTHOR|*
<img src=”*|RSSITEM:ENCLOSURE_URL|*”>
*|RSSITEM:CONTENT_FULL|*
I hope it helps,
I wanted to load your plugin on another website I am developing, but I can’t seem to find your plugin anywhere anymore. Is there an alternative I should be looking for? I would really appreciate your advice on this thanks!
Loren
I’ve added a download link at the end of this article. Be my guest!
Thanks so much for this.
Hey Will. Thank you for the plugin. I’ve got it working with Mailchimp. There is only one issue. When I look at my feedburner feed, I now see the following text at the end of each post “MEDIA ENCLOSURE:” You can see this happening here: http://feeds.feedburner.com/missionrecife. Is there a way to remove this from appearing on feedburner? Thanks
Hey Josh,
I guess you will need to use the other publishing method. I’m not familiar with FeedBurner though.
All the best,
Will
Hi Will,
I found your plugin in a post the mailchimp marketing blog. Thank you for building it!
I have a site using the webcomic plugin. I want to provide email subscription via mailchimp, but can’t get the images to show up in the email, or in the popup preview window when building the feed in mailchimp.
I’ve been told by mailchimp to create a mailchimp-specific feed and tag all images with media:content.
I tried your plugin, hoping for the same effect, but no dice.
All I get is a blank thumbnail with a broken image link icon in the middle. Clicking that takes you to the comic, however.
I consider this a step in the right direction, but still not there, yet.
Any suggestions?
Hey Peter,
Do you mind to share your rss? That way I might know what’s going on.
Of course! Thank you.
It’s not out there in the world yet. Test images only. But it is live:
http://feeds.feedburner.com/EverForward
Hey,
I’m not familiar with what feedburner does with RSS feeds so please post your regular WP RSS feed.
P.s. Currently I have email subscription set up with feedburner and the images do not show up in those emails either.
Thanks Will. I’m pretty new at this. Can you tell me where to find that?
Pretty sure it’s:
http://everforward.lifeismaking.com/feed
Where can we download this plugin?
I’ve added a download link at the end of this article. Go for it!
Sorry to be a pain with all the questions, but I am using mailchimp RSS and it is pulling in all the images brilliantly. However, for some posts I don’t have an image so I was wondering if there was a way to tell it not to include anything if there is no image rather than the blue question mark image that it is displaying for the error when it can’t find an image?
This is what I have in the source at present (messy formatting I know because I have made a lot of changes in the format and I am too scared to change anything incase I stuff it up):
*|RSSITEMS:|**|RSSITEM:TITLE|*
*|RSSITEM:CONTENT|* Read more…
*|RSSITEM:TWITTER|* *|RSSITEM:LIKE|*
*|END:RSSITEMS|*
For some reason it didn’t copy in the format as per the source code. Trying again (putting it in quotation marks to see if that allows it to be posted in this format):
“*|RSSITEM:DATE|* *|RSSITEM:AUTHOR|*
*|RSSITEM:CONTENT_FULL|*”
No problem. I think I know what you are talking about.
A template is a template so once you use it, its code is written in stone and can’t be changed.
That means that if you code it to expect an image, it will expect it no matter what. You are responsible to sent it a picture for every entry in the feed.
I understand that that’s not the case for every single blog post so my advice would be to use the filter the plugin provides and, when the post doesn’t have an image, send either a default image with your logo or something… or send a transparent gif.
That should solve your problem.
W