Adding a featured image to atom feed

Actually I should have used the atom_entry() hook.

So the following code will add your post thumbnail to your atom feed:

function featuredImageToRSS()
{
    global $post;
    $content="<image>";
    if (has_post_thumbnail($post->ID)) {
        $content .= get_the_post_thumbnail_url($post->ID);
    }
    $content .= '</image>';
    echo $content;
}


add_action('atom_entry', 'featuredImageToRSS');