I used the following code to enable image tags in the comment form. If I input the text with image upload, the image not displayed in the displayed comment.
function my_comment_tags() {
global $allowedtags;
$allowedtags = array(
'img' => array(
'src' => array(),
'alt' => array(),
'title' => array(),
'height' => array(),
'width' => array()),
'strong' => array(),
'em' => array(),
'a' => array(
'href' => array (),
'title' => array ())
);
}
add_action('comment_post', 'my_comment_tags');
But it is not working. Is there any way to upload image in the comment form?