Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

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.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

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. Mike Avery

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

    Have you tried it yet? Can you recommend it?

    • WPBeginner Support

      For the moment we have not tested that specific plugin

      Admin

  2. sr

    Any updates for ways to allow comments to upload photos and docs easily?

    • WPBeginner Support

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

      Admin

  3. Geoff

    I have 4 pages on my website how do i just add the comment plugin to work on just one page? thanks

    • WPBeginner Support

      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

  4. Monir

    thank you, this article was really helpful!

    • WPBeginner Support

      You’re welcome, glad our guide was helpful :)

      Admin

  5. Phoebe Moon

    The plug in is no longer available.

    • WPBeginner Support

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

      Admin

  6. Jane Beinart

    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?

    • WPBeginner Support

      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

  7. Rachael

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

    • WPBeginner Support

      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

  8. omer noiman

    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 …

    • WPBeginner Support

      Hi Omer,

      Try updating your permalink structure. Simply visit Settings » Permalinks and then click on the save changes button without changing anything.

      Admin

      • Heidi

        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.

        • WPBeginner Support

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

        • Heidi

          Thanks, that wasn’t it, unfortunately.

  9. Michael Vivar

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

  10. Chaz DeSimone

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

  11. Monique

    This only works if you have a business wordpress account!

  12. Hossein

    Hi
    May I know what is the plugin that you use for subscribing to comments?
    Thanks

  13. Rod Fleming

    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.

  14. Manasa

    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.

  15. Mac

    Why have you not enable the option of putting up images,while commenting?

  16. Traruh Synred

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

  17. Amber

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

  18. M.Khurram

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

  19. Pamela

    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??

  20. Marcus

    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.