Looking for a way to let users upload comment images or videos at your WordPress site?
To help you do just that, we’ll show you how to use a free WordPress plugin to let users upload their own images (or even videos) to your comments sections.
What are the benefits of letting users upload comment images in WordPress?
Comment images are useful for a few reasons. Some of those reasons are for fun and engagement, while others are necessary for more efficient workflows. Here are a few examples:
- Users can submit screenshots of problems they’re having to technical support teams.
- Comment images allow people to add user-generated content to your blog posts–like someone sharing pictures of their trip to Florence on a post about Italy.
- You give people the chance to respond with memes, making the conversations more visual and fun.
- You don’t have to limit your comment uploads to images. Some companies might find it helpful to allow PDF or video uploads.
How to let users upload comment images in WordPress
To let users upload comment images in WordPress, you can use a free plugin called Comment Attachment:
Beyond letting users upload images, this plugin also gives you the choice of allowing videos, PDFs, and other file type uploads.
To get started, install and activate the plugin on your WordPress site. If you have any questions about installing a WordPress plugin, take a look at our guide on this topic.
Note – this plugin will only work with the default comments section. It will not work if you’re using a third-party comments solution like Disqus or Postmatic.
Step 1: View the frontend of a blog post
Once you’ve activated the plugin, it starts working right away. To preview the default functionality, go to the frontend of your website and scroll down to the comments section on a blog post.
You should see the standard “Leave a Reply” text and the comment box. But now, a Choose File button also shows up, along with a list of the allowed file types.
Click on the Choose File button and select a JPG or PNG image from your computer. Type some text into the comment box, then click on the Post Comment button.
You should now see a thumbnail version of the image right below the comment!
Step 2: Adjust your settings for comment images
As you saw above, the Comment Attachment plugin works fine right out of the box. However, you may want to change around the layout of your upload area or maybe restrict the uploads for certain file types.
To do so, go to Settings > Discussions in your WordPress dashboard.
The first collection of settings involves items for the display of your comments and upload features.
How you customize this is up to you, but I recommend changing the attachment field title to make it more fun or related to your brand. For instance, a technical support blog may say something like “Please upload a screenshot of your issue.”
You can also change the image attachment size to make it a little bit bigger than a thumbnail.
Other than that, there are some additional settings you can modify, such as requiring an attachment, changing the position of the attachment in the comment, and linking to the attachment in the comment (this one is important for documents–more on that below).
At the bottom of the page, you can also specify which file types are allowed for uploads, which is important for a few reasons.
First of all, you’ll notice that a few of the file types don’t work that well. For instance, animated GIFs don’t play, so it would be pointless to support that. In addition, you don’t want to accept files types that aren’t relevant to your blog or business. As an example, a technical support team for a software company probably doesn’t need to accept audio clips.
So, go ahead and choose the file types you would like to permit. After that, don’t forget to save your changes.
Step 3: Test out the comment images and other attachments
Now it’s time to go back to the comment section on one of your blog posts. You should now only see the file types you accept and whatever display changes you made in the settings.
Bonus: Handling attachments other than images
This plugin does a wonderful job of displaying image attachments in the right formats. For instance, uploading a video or audio clip automatically embeds the media into the comment, as seen below.
However, documents are a little different. For some reason, the default settings show the file name of the document in the comments, but without a link. This is obviously useless.
In order to add a link to the document (and all attachments,) go back to the Settings page and find the line that reads “Make attachment in comment a link?” Make sure this is checked. After that, all of your document attachments will provide a link for people to click on and download.
Bonus 2: Managing comment images and attachments from the backend
It’s not uncommon for site moderators to view, delete, and approve comments from the WordPress dashboard.
If this is the case for your operation, you’ll be happy to know that all of the comment attachments are shown in the Comments area of WordPress. All you have to do is click on the attachment link to view the item.
Therefore, you can still moderate the attachments for spam as you would any other WordPress comment.