Title: teso's Replies | WordPress.org

---

# teso

  [  ](https://wordpress.org/support/users/teso/)

 *   [Profile](https://wordpress.org/support/users/teso/)
 *   [Topics Started](https://wordpress.org/support/users/teso/topics/)
 *   [Replies Created](https://wordpress.org/support/users/teso/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/teso/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/teso/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/teso/engagements/)
 *   [Favorites](https://wordpress.org/support/users/teso/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Pulling comment image into comment RSS Feed](https://wordpress.org/support/topic/pulling-comment-image-into-comment-rss-feed/)
 *  Thread Starter [teso](https://wordpress.org/support/users/teso/)
 * (@teso)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/pulling-comment-image-into-comment-rss-feed/#post-4640527)
 * This pulls in comment images and resizes Oembed Vimeo and Youtube in the comments
   RSS feed (sorry for the poor variables convention):
 *     ```
       function change_vimeo_width($contentwv) {
       if (is_comment_feed()) {
       $post_id = get_the_ID();
       		 	$comments = get_comments( $post_id );
       	   foreach ($comments as $comment) {
        $comment_id = get_comment_ID($comment);
        $contentwv = get_comment_text($comment_id);
        $retstringwv= 'width="269"';
        $retstringhv= 'height="auto"';
       	$patternwv = '(width=[\'\"](\d+)[\'\"])'; //pattern to look for
       	$patternhv = '(height=[\'\"](\d+)[\'\"])';
           if (false !== strpos($contentwv,"youtube")) {
              $replacedwidthv = preg_replace($patternwv, $retstringwv, $contentwv );
              return preg_replace($patternhv, $retstringhv, $replacedwidthv );
           } elseif (false !== strpos($contentwv,"vimeo")) {
              $replacedwidthv = preg_replace($patternwv, $retstringwv, $contentwv );
              return preg_replace($patternhv, $retstringhv, $replacedwidthv );
           } elseif (get_comment_meta($comment_id, 'comment_image', true)) {
               		$comment_image = get_comment_meta($comment_id, 'comment_image', true);
                       $output .= '
                       <img src="' . $comment_image['url'] . '" alt="" />
                       ';
                       $output .= '</div>
                       ';
                       $contentwv = $contentwv.$output;
           	return $contentwv;}
           }
           }
           return $contentwv;
       }
       add_filter('comment_text','change_vimeo_width');
       ```
   

Viewing 1 replies (of 1 total)