Tagged: , ,

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #781296

    Hi,
    I opened a thread about this and I thought it was solved so that thread is now closed, but it appears I need to still increase the size of the photos in my RSS feed at http://www.thomashenthorne.com/feed

    I’m not a coder so before modifying functions.php, I wanted to ask for your input. The current code you gave me is:
    function featuredtoRSS($content) {
    global $post;
    if ( has_post_thumbnail( $post->ID ) ){
    $content = ‘<div>’ . get_the_post_thumbnail( $post->ID, array( ‘width’=>150, ‘height’=> 150 ), array( ‘style’ => ‘margin-bottom: 15px;’ ) ) . ‘</div>’ . $content;
    }
    return $content;
    }
    add_filter(‘the_excerpt_rss’, ‘featuredtoRSS’);
    add_filter(‘the_content_feed’, ‘featuredtoRSS’);

    It looks to me like it’s feeding a 150 x 150 image to RSS which is too small. I would rather send the Enfold medium size which is 300×300, and then understand how to send a large size if that is still too small for the feed.

    Can you help me customize above code?

    Thanks!!!
    Rob

    #781633

    Hey Rob,

    To attach the 300×300 size image to it, we’ll just change the values in the fourth line so that it becomes this:

    function featuredtoRSS($content) {
    global $post;
    if ( has_post_thumbnail( $post->ID ) ){
    $content = '<div>' . get_the_post_thumbnail( $post->ID, array( ‘width’=>300, ‘height’=> 300 ), array( 'style' => 'margin-bottom: 15px;' ) ) . '</div>' . $content;
    }
    return $content;
    }
    add_filter('the_excerpt_rss', 'featuredtoRSS');
    add_filter('the_content_feed', 'featuredtoRSS');

    Can you try that out please? 

    Sarah

    #781794

    Thanks for your help!

    I inserted the above code and it still appears when visiting http://www.thomashenthorne.com/feed that the photos are 150×150? See below copy paste from the rss feed page:

    <description><![CDATA[<div>Jim Tyson and Mike Perona Entertaining in their Home</div>
    <p>My clients and friends Jim Tyson and Mike Perona have been renovating homes since they moved to Marin County from San Francisco’s Noe Valley neighborhood back in 2002. They transformed their first home, 22 Spring Grove in San Rafael’s West End neighborhood, into a showplace, but craved a larger home with views. When they first walked through the doors of 42 Edgewood Way in San Rafael’s Fairhills neighborhood, they immediately saw the potential.</p>
    <p>The post Client Profile: Jim and Mike’s Remodel in San Rafael’s Fairhills Neighborhood appeared first on <a rel=”nofollow” href=”http://www.thomashentho

    The reason this is important is Mailchimp uses this photo in “new blog article” campaigns it mails out, and it is sending out a very small picture which it then tries to enlarge and looks fuzzy.

    Thanks!

    #781798

    It seems like we need to change the “thumbnail” to another photo size in the code per this advice in this thread:

    https://kriesi.at/support/topic/large-image-in-rss-feed/

    ?

    #783822

    Hi,

    Please replace the filter with the following. We are going to use the “portfolio” thumbnail which has a maximum dimension of 450x450px.

    function avf_featured_image_rss($content) {
      global $post;
      if ( has_post_thumbnail( $post->ID ) ){
        $content = '<div>' . get_the_post_thumbnail( $post->ID, 'portfolio' ) ) . '</div>' . $content;
      }
      return $content;
    }
    add_filter('the_excerpt_rss', 'avf_featured_image_rss');
    add_filter('the_content_feed', 'avf_featured_image_rss');

    Best regards,
    Ismael

    #836498

    I had overcome the issue with this by just going into settings –> media and changing the default thumbnail size when uploading from 80×80 to a much larger size. This worked fine until recently when an update reverted the thumbnail back to 80×80, so the last two posts on my feed show very small photos and those are being passed to Mailchimp. Mailchimp needs larger photos or else the emails it sends out have blurry photos.

    http://www.thomashenthorne.com/feed/

    When I changed the functions.php to the above code on my staging site, the thumbnails are still small (cache cleared) when I view them with https://codebeautify.org/rssviewer

    Is there another solution to get Enfold to pass larger (450×450) size photos to the rss feed?

    Thanks much
    Rob

    #836971

    Hi Rob,

    You need to set the thumbs to a bigger size again and regenerate thumbnails.

    Best regards,
    Victoria

    #837133

    Great, thanks, should I remove the code from the functions.php file then?

    This worked and I used a re-generate plugins plug just to regenerate the two photos that had been uploaded since the thumbnail setting size changed. In case anyone else is searching threads and has the same issue, the optimal size for thumbnails for Mailchimp campaigns is 600×600 and allow thumbnails to remain proportional under the settings –> media menu.

    Thanks,
    Rob

    #837452

    Hi Rob,

    Whichever works for you! Glad you got it working for you! :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Need to change photo size in RSS Feed’ is closed to new replies.