Title: Re-adding Images
Last modified: April 7, 2017

---

# Re-adding Images

 *  [twcstuff](https://wordpress.org/support/users/twcstuff/)
 * (@twcstuff)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/re-adding-images/)
 * I started using the WPDiscuz plugin and it seems that Comment Images Reloaded
   doesn’t work here. Is it possible to add a little bit of code to the wpDiscuz
   files (I am happy to do) that will allow that plugin to render the old comments
   that have images from this plugin? Or is there a better solution?

Viewing 1 replies (of 1 total)

 *  Thread Starter [twcstuff](https://wordpress.org/support/users/twcstuff/)
 * (@twcstuff)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/re-adding-images/#post-9007798)
 * I managed to figure it out.
 * The below was used to hook into the loop for WPDiscuz that outputs the comments.
   Checking if there is a meta value stored under the key ‘comment_image_reloaded’,
   if so then append the image to the bottom of the comment.
 *     ```
       function legacy_comment_images($commentContent, $comment, $args) {
   
       	$attachment = get_comment_meta( $comment->comment_ID , 'comment_image_reloaded', true );
   
       	if ( $attachment != null ){
       			$commentContent .= wp_get_attachment_image($attachment[0], 'medium');
       	}
   
       	return $commentContent;
       }
   
       add_filter('wpdiscuz_comment_text', 'legacy_comment_images', 10, 3);
       ```
   
    -  This reply was modified 9 years, 2 months ago by [twcstuff](https://wordpress.org/support/users/twcstuff/).
    -  This reply was modified 9 years, 2 months ago by [twcstuff](https://wordpress.org/support/users/twcstuff/).

Viewing 1 replies (of 1 total)

The topic ‘Re-adding Images’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/comment-images-reloaded_81b5c0.svg)
 * [Comment Images Reloaded](https://wordpress.org/plugins/comment-images-reloaded/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/comment-images-reloaded/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/comment-images-reloaded/)
 * [Active Topics](https://wordpress.org/support/plugin/comment-images-reloaded/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/comment-images-reloaded/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/comment-images-reloaded/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [twcstuff](https://wordpress.org/support/users/twcstuff/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/re-adding-images/#post-9007798)
 * Status: not resolved