Improve your RSS: for full text feeds, replace large site images with email friendly images.…
Between larger monitors, retina screens, and better image optimization, the images we serve up on our websites are larger than they’ve ever been. RSS to email services such as MailChimp, however, are constrained to what email clients can display, which is small, small, small. And although it’s possible to try to style images with a max-width in your emails, not all clients will honor it (I’m looking at you, Outlook).
If your site’s RSS feed is set to Full Text, this plugin makes sure your emails look more like your website:
If you’ve used Summaries as your RSS feed settings, this plugin has not been for you. Until now. As of 3.0.0, Send Images to RSS brings the awesome to you, too. Here’s the magic for your Summary feed:
This plugin should work with any theme. Some themes and plugins do modify the feed for their own purposes. Where possible, I’ve tried to account for them:
Note for [new] MailChimp users:
MailChimp has added a new setting to the RSS campaign setup process: “Resize RSS feed images to fit template” … please do not use this setting, especially if you are using excerpts with small images, or using small images with alignment, because MailChimp will blow them up and make them sad and ugly.
How can I change the size of the image being sent to the RSS?
Most users should not need to change this. The plugin is designed with a default image size of 560 pixels for the width of the new image. If, however, your RSS email template is more or less than 600 pixels wide, or you’re using a template with a sidebar, you may need to change this setting. What number you choose is up to you.
Mad Mimi users should set this to 530.
Note: If you use a template with a sidebar, I strongly recommend that you opt to use the Alternate Feed for your emails, as your images will be too small to be attractive on services like Flipboard and Feedly.
What about featured images?
If your site’s feed settings are set to Summary instead of Full Text, the featured image (or first image) will be added to each post. As of version 3.1.0, you can now add your post’s featured image to the full text feed as well. If you use this setting, please double check your feed (again) to make sure you don’t have duplicate featured images, as some themes and plugins do this as well. (If you are a Display Featured Image for Genesis user, I’ve got you covered–this setting will not work until you’ve deactivated this setting in that plugin.)
If you have added the featured image to your feed excerpt using your own functions, or another plugin, you will need to get rid of that before using this plugin, or select “No Image” for the Featured Image Size.
Does this plugin work with excerpts?
YES INDEEDY. It’s true, as of version 3.0.0, Send Images to RSS works with RSS feeds set to show excerpts/summaries! With this change, there’s a new plugin settings page to handle the additional settings, which allow you to add the featured image to your excerpt, set its alignment, and set the target number of words for the excerpt. If a post has images uploaded to it (attached), but no featured image, the plugin will use the first attached image for the excerpt.
What about smaller images?
Smaller images will still be small. WordPress handles image alignment differently than email clients (set by class v. inline align). If your smaller image has an right/left alignment set in post, the plugin will copy that alignment in your email as well, and add a margin.
I uploaded a large image to my post, but inserted a smaller version of it. The feed output a large version instead of the small. Can I change that?
Yes, you can change that. By default, the plugin simply looks to see if an email appropriate size image exists, and uses that, but this behavior will override small images in your posts if that large version exists. To make sure that the small image is used even if the large one exists, disable the “Change Small Images” setting in the plugin’s settings page.
Note to iThemes Security users: if you are using the HackRepair.com blacklist feature, you will not be able to make use of this filter, because it blocks how Send Images to RSS retrieves image data in the feed. I would not suggest disabling the security feature just to be able to use this filter.
I have funky characters in my RSS feed and emails. Why?
Because you have funky characters and/or invalid markup in your posts. The plugin attempts to process your feed and encode wonky markup, but if your server doesn’t have certain packages installed, the fallback is to process your feed as is, warts and all.
I installed this plugin and the email that I sent out five minutes later still had giant images.
The plugin only generates properly sized images for new uploads–anything you uploaded before the plugin was active will still be giant, if that’s what you uploaded and your email client ignores a max-width setting. You can re-upload the images, or regenerate thumbnails, and they should behave as desired.
What is this Alternate Feed?
Because I use Feedly, and as a former photographer, it bothers me to see the freshly rendered email sized images blown up and soft to fit Feedly/Feedburner specs. So this gives you the option of having your main feed(s) with large images (galleries will be converted, too), but a special email-only feed which you can use with an email service like MailChimp, Campaign Monitor, or FeedBurner.
I selected Alternate Feed, clicked the link for my new feed, and got a 404 (Page Not Found). Help?
If this happens, your permalink for the new feed may not have been updated. Visit Settings > Permalinks in your admin. Save Changes if you like, and refresh your feed page.
What is Simplify Feed?
If you use native WordPress galleries in your posts, they’re sent to your feed as thumbnails. Even if you do not use an RSS/email service, you can still use this plugin to sort out your galleries for subscribers who use an RSS reader. If you select Simplify Feed, your galleries will be converted, but there will not be an email sized image created, and no alternate feed will be created.
What if I upload my images to [flickr] or use images hosted somewhere other than my website?
Send Images to RSS works best with images uploaded through your WordPress website, because WordPress automatically creates the correct size images needed. However, the plugin will add inline styling to all images to attempt to make them fit your email template.
Is there a way to change the styling on the images in my feed?
Yes, there sure is. To modify large/email size images, use a filter like this:
add_filter( 'send_images_rss_email_image_style', 'rgc_email_images', 10, 2 );
function rgc_email_images( $style, $maxwidth ) {
return sprintf( 'display:block;margin:10px auto;max-width:%spx;', $maxwidth );
}
You can also filter styling for images with captions, or images which do not have an email size version generated for some reason. I would look into /includes/class-sendimagesrss-feed-fixer.php
to really examine the filters, but here’s a quick example for the images:
add_filter( 'send_images_rss_other_image_style', 'rgc_change_other_images', 10, 6 );
function rgc_change_other_images( $style, $width, $maxwidth, $halfwidth, $alignright, $alignleft ) {
$style = sprintf( 'display:block;margin:10px auto;max-width:%spx;', $maxwidth );
if ( $width < $maxwidth ) {
$style = sprintf( 'maxwidth:%spx;', $halfwidth );
}
return $style;
}
The filter for captions is send_images_rss_caption_style
, but takes the same arguments as above.
What if I want the full feed to be processed AND have the featured image added to the excerpt?
As of version 3.1.1, you can do this on the plugin settings page. Make sure your feed settings are set to full text, and then check the “Process Both Feeds” setting.
If you used the filter to set this up in earlier versions of the plugin, you can leave the filter in place, and it will continue to work, or you can remove it and use this setting instead. The filter will always override the option on the settings page.