PHPMatters Help You Better Hosting Your PHP-based Sites
How to Enable Images in WordPress Comments

How to Enable Images in WordPress Comments

The comment section is an important website area for better engaging your audience. As the usual way for commenting is to leave some textual contents and links, the allowance of adding graphical components helps your readers better express their thoughts in a vivid manner.

By default, WordPress does not allow the adding of images in the website comments, and almost all the plugins keep this default configuration. In this case, we’d like to showcase a special tutorial, telling you how to enable images in WordPress comments as below.

Enable Images in WordPress Comments

In fact, WordPress has some useful plugins that help you achieve this goal with much ease. Therefore, if you are not willing to bother your website CSS, you can utilize the Comment Image plugin.

After installing and activating it, you simply need to navigate to the Settings tab of your WordPress admin and then click the Comment Image button to enter the configuration page.

Comment Image

Here, you need to decide three settings, including image selection field, image field label and thumbnail width.

  • Image Selection Field – This includes the options of injecting images via WordPress hook or JavaScript or injecting manually. Personally, we recommend you to choose the first two options as they will display the input area automatically. The only difference is that the former adds the field after the comment submit button while the latter one is in a contrary situation.
  • Image Field Label – By default, the content of the label is “Optionally Add An Image”. Unless you have some specific requirements, you can leave this field unchanging.
  • Thumbnail Width – The default width is 200 pixel, but you can adjust the value according to your webpage design.

Now, once your readers want to leave some comments for your blog post, they can attach the images with the formats of GIF, PNG JPEG and JPG.

Leave Comment with Images
Alternative Plugin – Comment Attachment

This plugin allows your readers to attach not only images, but also some documents or videos into their comments. Again, you should install it and go to the Admin settings tab to find its exclusive button.

Once entering the setting page, you need to configure more settings than those of Comment Image plugin.

  • Comment attachment settings – Here, you can refer to the following screenshot which is the recommended settings of this plugin. Note that the attachment field title and the image size can be adjusted based on your real situations.
  • Comment Attachment Settings

  • Allowed File Types – The available types include JPG, GIF, PNG, PDF, DOC and DOCX. Personally, we recommend you to choose all of them.