=== Send Images to RSS === Contributors: littler.chicken, garyj Donate link: https://robincornett.com/donate/ Tags: email, RSS, images, feed, mailchimp, email campaign, RSS email, feedburner, email marketing, featured image RSS, excerpts Requires at least: 4.9 Tested up to: 5.5 Requires PHP: 5.6.20 Stable tag: 3.4.1 License: GPL-2.0+ License URI: http://www.gnu.org/licenses/gpl-2.0.txt Improve your RSS: for full text feeds, replace large site images with email friendly images. Customize summaries with images and beautiful excerpts. == Description == _Send Images to RSS_ bridges the gap between large websites and small emails, by replacing images in your feed with smaller, email friendly images, and attempting to add markup which email clients can handle. 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). _Send Images to RSS_ makes it easy to create beautiful, email friendly RSS campaigns, with minimal setup required, regardless of your feed setup. = Full Text RSS Feeds = If your site's RSS feed is set to Full Text, this plugin makes sure your emails look more like your website: * Replace overly large images with email friendly size images. * Convert galleries from thumbnails to full width images. * Add email friendly styling/alignment to your images. = Summary Text Feeds = 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: * Add the post's featured image to your excerpt. Choose the size and alignment. If no featured image is set, the plugin will use the first image uploaded to the post. * Set a custom length for your RSS summary/excerpt. Pick the number of words you want your summary to have, and the plugin will aim for that, but with the added bonus of making sure the final sentence is complete. * If you add a manual excerpt to your post, because you like to have full control, the plugin will properly use that instead. * Automatically add a custom "read more" link to the end of every post summary, to keep your feed pointed back to your site. = Known (non)Issues = 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: * For summary feeds, the _Yoast SEO_ RSS link is removed (the full text feed and front end output are not changed). * For summary feeds, the excerpt filter added by the _Woo Canvas_ theme is removed (the full text feed and front end output are not changed). * For summary feeds, this plugin will replace the image settings for _Display Featured Image for Genesis_ for versions 2.3.0 and later (because this plugin is smarter). If you're using _Display Featured Image for Genesis_ 2.2.2 or lower, this plugin will concede graciously. But you should update, please. * For full text feeds, this plugin will not duplicate featured images if they are being added by _Display Featured Image for Genesis_--you will want to disable that feature in _Display Featured Image for Genesis_. **NOTE: it is up to you to check that your feed output is still working, especially in your email system of choice, once it's installed.** I've attempted to set it up to handle XHTML or HTML5, and function even if your feed is wonky, but **please** double check, and let me know if you have issues, and if so, what specifically they are. = Props = Special thanks to [Gretchen Louise](https://gretchenlouise.com/) for her summary feed contributions. Spanish translation offered by [Web Hosting Hub](http://www.webhostinghub.com/) == Installation == 1. Upload the entire `send-images-rss` folder to your `/wp-content/plugins` directory. 1. Activate the plugin through the 'Plugins' menu in WordPress. 1. Visit the Settings > Send Images to RSS page to change the default behavior of the plugin. == Frequently Asked Questions == = 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. == Screenshots == 1. Screenshot of the plugin settings in Settings > Send Images to RSS. == Upgrade Notice == 3.4.1: bug fix for users on WordPress 4.9 3.4.0: Adds support for core gallery block; updated minimum WP and PHP versions == Changelog == = 3.4.1 = * fixed: undefined function for sites running WordPress 4.9 = 3.4.0 = * added: support for core gallery block * updated: new minimum WordPress version 4.9 * updated: new minimum PHP version 5.6.20 * fixed: image IDs not being properly retrieved if the original image is larger than 2560 px wide = 3.3.2 = * fixed: error with external images/captions on full feeds = 3.3.1 = * fixed: overzealous tag stripping on excerpts (props @gretchenlouise for reporting) = 3.3.0 = * added: filter for the excerpt permalink * added: filter to allow users to keep shortcodes in excerpts * added: support for