How to modify the image size in RSS (mailchimp compatibility)?

I am using the following code in my functions.php and it shows the thumbnail properly in my mailchimp's campaign test email ...

function dn_add_rss_image() {
global $post;

$output = '';
if ( has_post_thumbnail( $post-ID ) ) {
    $thumbnail_ID = get_post_thumbnail_id( $post-ID );
    $thumbnail = wp_get_attachment_image_src( $thumbnail_ID, 'thumbnail' );

    $output .= 'media:content xmlns:media="http://search.yahoo.com/mrss/" medium="image" type="image/jpeg"';
    $output .= ' url="'. $thumbnail[0] .'"';
    $output .= ' width="'. $thumbnail[1] .'"';
    $output .= ' height="'. $thumbnail[2] .'"';
    $output .= ' /';
  }
  echo $output;
}
add_action( 'rss2_item', 'dn_add_rss_image' );

but I'd like to show large size images in my campaign since the thumbnail looks bad and the image is cut. Please help me modify the code above to show full featured images with the ability to change the width.

Any help is highly appreciated.

Topic plugin-mailchimp rss Wordpress

Category Web


$thumbnail = wp_get_attachment_image_src( $thumbnail_ID, 'full' );

https://codex.wordpress.org/Post_Thumbnails

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.