display featured image in RSS feed

Hay, does anyone know a way to display the featured image url within the RSS feed?

Related posts

Leave a Reply

1 comment

  1. function add_featured_image_url($output) {
        global $post;
        if ( has_post_thumbnail( $post->ID ) ){
            $output = wp_get_attachment_url( get_post_thumbnail_id( $post->ID ) ) . ' ' . $output;
        }
        return $output;
    }
    
    add_filter('the_excerpt_rss', 'add_featured_image_url');
    add_filter('the_content_feed', 'add_featured_image_url');