Index: wp-content/plugins/wp-rss-images/wp-rss-images.php =================================================================== --- wp-content/plugins/wp-rss-images/wp-rss-images.php (revision 538837) +++ wp-content/plugins/wp-rss-images/wp-rss-images.php (working copy) @@ -91,10 +91,23 @@ } +/** + * Returns a URL to an image in the user uploads directory on this server. + * + * Developers can hook the wp_rss_image_alternative filter to provide their + * own image URL on this server, or hook the wp_rss_image_size filter to + * provide a specific size for the featured_image. + * + * @param string $size Defaults to medium, a WordPress image size added with add_image_size + * @return string The URL to an image on this server + */ function wp_rss_img_url($size = 'medium') { global $post; - if( function_exists ('has_post_thumbnail') && has_post_thumbnail($post->ID)) { + if ( $img_url = apply_filters( 'wp_rss_image_alternative', false, $post->ID ) ) { + return $img_url; + } else if( function_exists ('has_post_thumbnail') && has_post_thumbnail($post->ID)) { $thumbnail_id = get_post_thumbnail_id( $post->ID ); + $size = apply_filters( 'wp_rss_image_size', 'medium', $post->ID ); if(!empty($thumbnail_id)) $img = wp_get_attachment_image_src( $thumbnail_id, $size ); } else {