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

How to Allow Users to Upload Images in WordPress Comments

Do you want to allow users to attach images and files in WordPress comments?

Images and comments are both powerful tools to boost user engagement on your WordPress site. Depending on your site’s niche and target audience, allowing visitors to upload images in comments 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.

Allow users to upload images in WordPress comments

Why Allow Users to Upload Images in WordPress Comments?

WordPress comments are a great way to communicate with your visitors. People leave feedback, ask questions, and offer recommendations that can be useful for building your brand and improving products.

Allowing users to upload images in comments can further boost the user experience. For example, visitors can share screenshots of their problems in the comments, giving your support team more information to resolve their issues.

Similarly, it can help start engaging discussions where people can share funny pictures and memes. This will help make your comments visually appealing and more fun to read.

Or if you’re running a travel blog, then allowing images in comments can help gather user-generated content. For instance, users can share pictures from their favorite destinations, places they visited, and more.

That said, let’s see how to allow image uploads in WordPress comments.

Video Tutorial

Subscribe to WPBeginner

If you’d prefer written instructions, just keep reading.

Allow Users to Upload Images in WordPress Comments

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

Upon activation, the plugin will work out of the box and add a file upload option in the WordPress comments area.

You can edit its settings by going to Settings » DCO Comment Attachment from your WordPress dashboard.

Change DCO comment attachment settings

The plugin lets you set a maximum upload file size, make it a requirement to attach files, embed attachments, select an attachment image size, and more.

You can also allow your users to attach different file types, like a document, PDF, PowerPoint presentation, excel spreadsheet, and more by checking the file type option.

There’s also an option to select all users or only allow logged-in users to upload attachments in WordPress comments.

Choose file types to upload

When you’ve made the changes, don’t forget to click the ‘Save Changes’ button.

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

Upload image attachment preview

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.

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

To avoid abuse of this feature, we recommend adding some comment 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 notifying users when their comment is approved on your site.

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 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, and how to start an online store.

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. Here's our editorial process.

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 :)


    • 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.


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


  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.


  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.


  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?


  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 to Mac Cancel 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.