Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Allow Users to Upload Images in WordPress Comments

Images and comments are both powerful tools to boost user engagement on your site. This is one of the reasons why Facebook allow users to upload images with their comments. What if we tell you that you can add the same functionality to WordPress comments? Depending on your site’s niche and target audience, this can significantly increase user engagement on your site. In this article, we will show you how to allow users to upload images in WordPress comments.

How to Allow Users to Upload Images in WordPress

Video Version

Subscribe to WPBeginner

If you don’t like the video or need more instructions, then continue reading.

Allow Users to Upload Images in WordPress Comments

First thing you need to do is install and activate the Comment Attachment plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to go to Settings » Discussion page in your WordPress admin area and scroll down to Comment Attachment section.

Comment Settings

On this page, you can manage the settings to display image attachment field in the comments section of your WordPress posts and pages. These settings include the position of comment field, field title, required option, file types, image attachment size, and more.

You can also allow your users to attach a document, PDF, powerpoint presentation, excel spreadsheet, and more. Simply check the file type options in the comment attachment settings.

Allowed File Types

Once you are done, click on the Save Changes button to store your settings.

After that head over to any post page on your WordPress site, and you will see an image upload field in the comments area like the screenshot below:

Add Attachment in Comment

All images uploaded by users are stored in your WordPress media library. If you want to delete an image uploaded by a user, then you need to go to Media » Library, locate the image, and then delete it.

Note: This will delete the image from the comment without affecting the comment text.

It will be good to add some comment posting guidelines on your site to let users know what kind of attachments they can upload. You can check WPBeginner’s comment policy page for an example. You can then add a link to your comment policy text in the WordPress comment form.

Due to the nature of images, you may want to moderate all comments before they appear on your site. You can do this by enabling comment moderation and notify users when their comment is approved on your site.

You can also display the total number of comments to engage more users on the WordPress posts or pages.

To further boost media capabilities in your comments, you can enable oEmbed support for comments in WordPress. This will allow your users to embed YouTube videos, tweets, flickr photos, and more alongside with the images they upload.

We hope this article helped you learn how to allow users to upload images in WordPress comments. You may also want to see our tips on getting more comments on your WordPress blog posts .

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

33 CommentsLeave a Reply

  1. There seems to be a new comment attachment plugin called, “DCO Comment Attachment”,

    Have you tried it yet? Can you recommend it?

    • Not at the moment but once we find something we will certainly update the article :)

      Admin

    • Apologies, the plugin we are currently recommending is no longer available. We will be sure to update the article with an alternative when we are able, after which we would be able to look into conditional loading.

      Admin

    • Thanks for letting us know about that, we’ll be sure to look for an alternative

      Admin

  2. Is it possible to post photos this way via your mobile phone? I’m finding that posting photos via the computer is fine, but via iphone just gets an error message and says it is the wrong format of image. Any ideas as to how to make this work?

    • It would depend on the file type of image that is being sent. If it is one of your allowed file types you would want to reach out to the support for the plugin to let them know and they should be able to assist.

      Admin

  3. Is there anyway to filter the most top liked pictures to the top of the page?? Also is there a way for other users to reply to the comment? This worked but isn’t functioning the way I would like it to….

    • It should allow people to reply the same way they would reply to a normal content but for what you’re asking for may require a custom plugin.

      Admin

  4. Hey, I did everything as described.
    when i am trying to test this, and upload an image, it redirects me to page 404

    The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. Please try another search …

      • Hi, I am also having a page not found issue when trying to test this out by posting a comment with an image. The plugin support seems MIA. I did try what you suggested about the permalinks and I still can’t get my image to post. Any ideas? Thanks.

        • You may want to check with your hosting provider that you are not hitting a memory limit as one possibility.

  5. Quick question. If I have an existing comment widget and I install “Comment Attachment”, will existing comments be affected?

  6. Fantastic plugin for uploading photos with recipes submitted by readers…until we install a “real” recipes plugin. Thank you!

  7. If it’s a hosted site and you are Admin, just click on the img button and enter the URL of the image. For a local image, first upload to the Media Library and copy the URL. Paste that into the img dialogue box in the comment section and add an alt tag when prompted. No Plug-in required.

    I can’t remember how long this has been available in WP but it’s a long time; I’ve been a user for nearly 10 years and it’s always been like this.

  8. The wordpress website/s that I post comments to do not have the Upload Image option even though I know that users have posted images and so has the author/writer. But I do not know how else to upload an image without that option while posting comments.

  9. On a blog I post too I can’t load images. Others commenters do load images. They in could a link to the image.

    This doesn’t work for me. Yet the blog does allow images.

    I’ve tried various links in both email response and using WordPress reply. Niether works.. If I embed an image in an email it gets stripped out.

    I assume I’m doing something wrong, but can’t figure out what?

    E.g.,

  10. In Facebook, when you add a URL, it automatically sources the image for you. Is there a way to do that in WordPress comments?

  11. On installation process this is happening
    Unable to create directory wp-content/uploads/2015/03. Is its parent directory writable by the server?

  12. nice to be able to upload but the images are huge… they don’t retain their original size why??? can this be rectified so images stay in their original size??

  13. While this is certainly a great way to boost user engagement, on some hosting platform this can pose a serious security issue. It is surprisingly simple to disguise a php script as a gif image. I strongly suggest using plugins like these only in combination with some .htaccess magic preventing scripts from being executed within your uploads folder. Especially on shared hosting platforms.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.