Easiest way is to set feeds to summary display, which will use the_excerpt_rss() template tag, and which by default strips all HTML tags. This is a problem if you want to provide full feeds (just without images), as well as retain the links and other HTML in a post.
A hack-y solution would be to replace the_content() tag (where it appears in your feed scripts => wp-rss2.php, wp-atom.php and wp-rdf.php, depending on the formats you support):
<?php the_content('', 0, '') ?>
with a block of code like this:
<?php
$content = preg_replace('/<img[^>]*>/i', '', $post->post_content);
$content = apply_filters('the_content', $content);
echo $content;
?>
Thanks Kafkaesqui, that worked wonderfully!
Glad to hear.
A note to future readers that I forgot to mention you can replace the_content() with the_content_rss():
<?php the_content_rss('', 0, '', 0, 2); ?>
The last argument value (2) is for the ‘encode_html’ parameter. A setting of 2 strips all HTML tags from the post’s content, just as the_excerpt_rss() does. Merely passing along another option…
Oh, my God!!!
Thank you, Kafkaesqui, you have resolved a big problem to me. My Joomla was dragging all the images of my WordPress feed and now… :)) thank’s!
Regards
Yuri
_____
http://karaloka.net