Practical WordPress Development

Comment Images For WordPress

Comments have been closed on this post. Email me if you have any comments!

Comment Images For WordPress

Comment Images For WordPress is a plugin that – at the risk of sounding redundant! – allows readers to upload images to their comments.

Ultimately, it gives your community the ability to share a single image or illustration to support whatever they have to say.

For the most part, the plugin came out of a conversation that I had with a few people at a recent meetup – they wanted the ability for their visitors to share images with their comments, and wanted to share images with their comments, but lacked the ability to do so.

Comment Images For WordPress offers the following features:

  • If the plugin is incompatible with the current hosting environment, the administrator will be notified and the plugin will not give users the option to upload an image.
  • Readers may upload PNG, GIF, JPG, and JPEG images.
  • Visitors who attach images will be notified prior to submitting their comment if the image isn’t allowed
  • Images are styled to fit within the width of the comment container so that they do not overflow into the page
  • The plugin is fully localized and ready for translation.

Be sure to checkout screenshots of the plugin in action, too. You can view install it from the WordPress Dashboard or grab a copy on the plugin’s homepage.

If you’re a fan of the plugin, have received some support via email or the forums, or want to continue to help develop the plugin, you can also donate here.


  1. Andrew Mason

    Beastly! …We’re just one step away from turning wp comments into #meme-centers!

    • Tom McFarlin

      Ah, man. End game discovered!

  2. Jared Erickson


    • Tom McFarlin


      • Paul Moxon

        Hi Tom,

        jpegs are not attaching. No notifications.

        Is it my theme: Tweaker2. I hate to change it. But I see that the author’s site is gone.

        WP up-to-date
        running Mac OS X 10.8.2

        • Tom McFarlin

          I tried to check out the theme that you mentioned, but I got a 404 when I tried to load the page.

          This could be a bug with a couple of things:

          • Try using a different file type. If that works, let me know and I can resolve it.
          • Try using a different name for the file. If that works, also let me know.
          • How large is the file that you’re trying to load?
          • There’s always a chance that it’s your host not permitting the upload – if none of the above work, this may be the case.

          Let me know – let’s see what we can do to get it working!

          • Paul Moxon

            Thank you for you attention. Turns out it was settings in the plugin Spam Free WordPress. I should have seen this.

            Where’s your donate button? I’m self-employed, too.

            Btw: theme author has a new version and a new url with no redirect. No mention of themes or WordPress, just “Tips on e-Marketing Your Business”

          • Tom McFarlin

            Sure thing, Paul. Thanks for the follow up.

            You can find the donate button right here.

            Also, not sure what you mean by this:

            Btw: theme author has a new version and a new url with no redirect. No mention of themes or WordPress, just “Tips on e-Marketing Your Business”

            Which theme and/or theme author are you talking about?

  3. vitor

    Awesome plugin. Works fine with chrome, but I’m having some wierd issues with Firefox and IE, the upload doesn’t work in this browsers. Is it a bug or am I doing something wrong?

    • Tom McFarlin

      I’m going to take a look at this – are you on Windows or Mac? If I can pinpoint it, I’ll release an update as soon as possible!

      Thanks for shooting this to me, btw.

    • Tom McFarlin

      Actually, I just committed an update that should resolve your issue – it’ll show up in your Dashboard soon. Let me know if you still experience anything!

      • vitor

        I’m on Windows. I’ll try your update and let you know if it fixes the problem.

        And keep the awesome work in this :)

  4. Helen B

    I downloaded the plugin today and am occasionally receiving the following error when trying to add an image to a comment.

    Warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in /home/airtaxi/public_html/wp-content/plugins/comment-images/plugin.php on line 199

    Warning: Cannot modify header information – headers already sent by (output started at /home/airtaxi/public_html/wp-content/plugins/comment-images/plugin.php:199) in /home/airtaxi/public_html/wp-includes/comment.php on line 586

    Is there anything I can do to prevent this?

    • Tom McFarlin


      Possibly! Let me know what version you’re using and any recreation steps and I’ll do what I can to supply a quick fix.

      1. What version of the plugin are you using?
      2. Does the message appear when you attempt to upload a file, or has one not been selected? If one *has* been selected, what’s the filename?

      Let me know!

  5. christophermccoy

    how bout adding upload via ajax?

    • Tom McFarlin

      This is something I probably won’t bother doing because the comment image is appended to the comment content itself.

      Doing it via Ajax would require submitting the entire content by ajax. If that were to happen, we’d have to be able to detect when a user is done writing a comment – that’s tough :).

      So it’ll probably remain being submitted once the ‘Post Comment’ link is clicked.

  6. Bruce Wallin

    I get an “Heads up! You are attempting to upload an invalid image. If saved, this image will not display with your comment.” quote..Can you help? Thanks

    • Tom McFarlin

      Sure thing, Bruce!

      What type of file are you trying to upload? Perhaps a better question is what is the full name of the file that you’re trying to upload?

      • Bruce Wallin

        The “Heads up! You are attempting to upload an invalid image. If saved, this image will not display with your comment.” is right there before entering any image in the “Browse” box. The “Heads up! You are attempting to upload an invalid image. If saved, this image will not display with your comment.” is there as soon as I go to the “Post Comment” page…I always upload JPG..Thanks for your help!

        • Tom McFarlin

          If you can, do me two favors:

          1. Shoot me an email with the image attached (tom at tommcfarlin dot com)
          2. What’s the link to your blog? If it’s linked to your username in the comment, setup me up an account to leave a comment and I’ll check it out.

          • vitor

            This also happens to me when I try to comment on pages instead of posts. Seems like comments of pages are not exactly like posts.

            • Tom McFarlin

              Vitor – this has been resolved in the latest update to the plugin. Make sure you’ve got 1.3 and let me know if you’re still having problems.

  7. j

    Just testing out the plugin now. If 2 comments in a row contain images, the first image disappears? Any idea on how to fix this?

    • Tom McFarlin

      Hey Jack,

      Got this bug resolved – the update should appear in the Dashboard soon.

      Thanks for reporting it!

  8. James

    Hi Tom,

    Working fine but only one weird thing. The image does not show up in the comments during moderation. If approved image is present in comment. Even after approval image is still not visible in comments moderation.

    Otherwise I like it – thanks!



    • Tom McFarlin

      James – noted! I’ll have this resolved in a future update.

      Thanks for sharing this!

  9. lonchbox

    Hey, Seems don´t work with P2 Theme :(

    • Tom McFarlin

      Thanks for the heads up – P2’s a bit more of a unique theme than was I thinking when I originally built this, but I’ll add it to the list of things to look into for a future release and see what I can do.

      • lonchbox

        Thanx Tom, waiting for the update :)

  10. Noah's Dad (@NoahsDadDotCom)

    Great plug in, and great job! I’ve been looking for a plug in that could do something like this. I especially like how well the images resize when using a responsive theme.

    How’s how I’m using the plug in to create community:

    The plug in is great as is, but it would be 1up’d if there was a way to disable images in comments on a post by post basis. Being able to post an image in the comments works great for this type of post, but I don’t want people to be able to do it every time.

    Thanks for the great plug in, and being so quick with keeping it updated. I’m looking forward to finding other ways to use it!

    • Tom McFarlin

      Being able to display the plugin on a post-by-post basis is a great idea. I’ll make a note and see what I can do in one of the upcoming versions!

      Love seeing it used in the wild like this, too :).

      • Jane

        Hi and thanks for a great plugin! Was wondering if you were able to add the functionality to turn it on only for certain posts or pages.

        Many thanks again!

        • Tom McFarlin

          Yep – it’s in the latest version that’s available in the WordPress Plugin repository. It should appear as an update in your dashboard if it hasn’t already done so.

          • Jane

            Yes, I just saw it, fantastic! I see it’s only in the Posts. Is there a way to add it to Pages as well?


            • Tom McFarlin

              Not in the current version. I’ll add this as a feature request, though.

              Thanks Jane!

              • Jane

                Fantastic, look forward to it!

  11. Noah's Dad (@NoahsDadDotCom)

    I just read the post that talked about 1.4 and how you resolved an issue when someone posts 2 images back to back. I noticed today that happened this post. Someone posted two pictures, and the 2nd one didn’t show up. It left an odd broken image icon. It’s still on the post. Not sure if that is a result of a bug somewhere, or a problem with the image the user tried to upload. No big deal, and I didn’t think anything of it, until I read the release notes for 1.4 (which is the version I have.)

    Thanks again for the great plug in!

    • Tom McFarlin

      That particular issue probably has to do with the image either not being successfully uploaded or linked improperly (by using an image tag). Either way, I’ll make a note!

  12. Jayant Tyagi

    Should add a feature for preventing hot-linking also.. and yes jet pack comments option Notify me of follow-up comments via email doesn’t seems to work…

    • Tom McFarlin

      Will consider the hot-linking issue, though I think there’s a case to be made that this resides with the webmaster’s access rules as the same could be said about all the images on the site.

      Double-check your spam folder – everyone else seems to be doing fine. Let me know!

  13. Ekansh

    have one situatioin..want only those comments tobe displayed which are between admin & the logged-in user. help me

    • Tom McFarlin

      This would require some custom development. Shoot me an email if you’d like some help with this.

  14. Celes

    Hi Tom! Thanks so much for this amazing plugin. It’s a simple functionality but it really does wonders to this new initiative I’m planning for my blog.

    Can I check if you will adding an option to enable/disable the image upload option for selected posts? I only want to use the image upload option for certain posts, and not all posts (for obvious security reasons).

    • Tom McFarlin

      Hey Celes – thanks so much for the comment.

      This is a feature request that I’ll add and see if I can’t get it into the next release. Right now, I don’t have a date as to when that may be, but I’ll be sure to update this blog (and the plugin will update itself, of course :) when there’s a new version.

      Killer idea for a feature – thanks for sharing it!

      • Celestine Chua

        Thanks so much, Tom. :D I would like to inquire – If I enable a plugin for the month of October, and my readers upload images to their comments for the month of October, what will happen if I disable the plugin during November?

        (a) Will the images posted with the comments during October be removed?
        (b) Will the images posted with the comments, as well as the comments themselves, be removed?
        (c) Or will nothing happen and the images/comments remain intact?

        Separately, is it possible to engage you for custom tweaking of the plugin? What are your fees like?

        • Tom McFarlin

          C – none of the comments or images will be lost :).

          Shoot me an email with what you’re looking to have customized and we’ll talk!

          • Celestine Chua

            Sure! I’ve just sent you a mail via your contact form.

          • Celestine Chua

            Hi Tom, separately, I actually tested the plugin on my original enquiry and it appears that the images actually get *removed* from the comments when the plugin is disabled. They reappear when I enable the plugin. Can you include this function as part of my enquiry as well in my contact form submission? Thanks!

  15. Paul Moxon

    Tried to make a donation, but received this error message:
    “Oops, something went wrong (Your card was declined. Your request was in test mode, but used a non test card. For a list of valid test cards, visit:”

    Tweaker4 is the new theme I mentioned. Same author as my current one (Tweaker2) by Arnold Goodway

    • Tom McFarlin

      Ah, configuration mistake on my end. Try once more and let me know!

      • Paul Moxon

        Donation complete. Thanks for this plug in.

        • Tom McFarlin

          Got it – thanks so much, I really appreciate it.

  16. Andy

    Is there a way to re-size the images before uploading. Currently any image size can be uploaded but this can cause the other comments to be pushed way down the page if the previous image is huge. So is there a way to re-size images before/during upload

    • Tom McFarlin

      In the current version, there isn’t but should be applying styles so that images aren’t overflowing the comment list at all. I’m collecting a list of features to add in the next version, but it may be a little while before I’m able to get back at it.

  17. shima

    Hi Tom, I’m using Avada as my theme (Version 1.1.1).
    I added your plugin, and it doesn’t work. When I activate the default theme by wordpress it works. There has to be some sort of conflict with the theme I’m using. Do you have any idea why that is happening?

    • Tom McFarlin

      Hey Shima,

      Odds are, this has something to do with the way the theme is managing one of these three hooks:

      • comment_form
      • wp_insert_comment
      • comments_array

      My guess is that it’s happening with comment_form, but that’s the best I can offer without actually taking a look at the theme.

  18. Agra

    hi !
    This is a great plugin.

    i get a little conflict in between “wp-jquery-lightbox” plugin and this one. when i activate your plugin image lightbox doesn’t come up in firefox. but in chrome it works okay.
    i’m sorry this may not a fault in your plugin, but if you can suggest me something about it, like what may the problem that’s great.


    • Tom McFarlin

      Shoot me an email with a link to a page on which this error occurs, I’ll take a look, and we’ll go from there!

  19. Blake

    I installed the plugin and when making a comment with an image, the image doesn’t show up.
    If you can help, that would be great.

    • Tom McFarlin

      Hey Blake – if you shoot me an email, I’ll see what I can do about getting this resolved.

      Odds are it’s an issue with the theme, but I can’t say for certain until I look more in-depth.

  20. Jonni

    The image upload box only shows up when a visitor is logged into the site – is this the way it’s supposed to work?

    • Tom McFarlin

      No – it should work regardless. Shoot me an email with some more information along with a link to your site and I’ll see if I can pinpoint the issue.

  21. Jonathan Brandeis

    Love this plug-in. It’s like users can post without creating new pages. Great flow. My only problem is that when another user tries to reply, the text box is off to the right about 90% off screen. Any thoughts?

    • Tom McFarlin

      This likely has to do with styles from another plugin or theme interfering with the plugin. Contact me and I’ll take a look.

  22. Graham

    Tom others have mentioned that the images are not viewable in the comments until after they are approved. Sometimes I need to edit an image before approving it. The uploaded images are not in the media library so I was hoping you could tell me where they are and if I can edit and reinsert them into the comment.



    • Tom McFarlin

      Hey Graham,

      This is on the forefront for the next version. In the meantime, you’ll find all of the images in the /uploads/ directory in /wp-content/.

      The images are saved in the typical year/month fashion so you’ll be able to see them there. If you end up making these changes, make sure that you save the files with the original filename.

      Also, thanks for the comment and keep an eye out for an update to the plugin – hoping to have an update out sometime during the holidays!

      • Doug Green

        Tom – nice plugin and it comes very close to solving a major problem for me. The only issue is one of visibility in the comment before approving it – on one of my sites, I have to delete about half of the submitted pics because of very low quality (we have an insect expert id bugs for folks and they send in blurry, long range pics showing a pinhead sized bug) So I’d support the request for a very visible pre-approval in the comments view. And yeah, if it works and it lets me sort images, then that’s a plugin worth paying for. Thanks.

        And if folks can see the pics after approving them, that too is something I can’t do.

        • tommcfarlin

          This feature is in the pipeline for the next version that I’m working to have out within the month.

          Keep your eye on the blog or watch for the plugin update.

          Thanks for the support – definitely appreciate it!

  23. steve

    Images are uploading at full res – Is there a setting to opt the file sizes?
    Also many vertical images are loading on their sides – How can i control this?

    (I have been testing photos from iPhone and iPad they are scaling OK but the file size is pretty much out of camera).

    Thanks in advance.

    • Tom McFarlin

      Hey Steve,

      I responded to your emails, but wanted to capture it here for other readers just in case:

      Right now, there’s now way to control the size of the images being uploaded – you can adjust how they are displayed using CSS, but there’s no way to resize the actual file itself.

      Secondly, the “vertical images” loading on the site – can you show me an example screenshot or, better yet, a link? I may be able to offer some help with this, but need to see it in action first.

  24. Laura

    Hi Tom,

    I just have an important quick question for you. So far, everything is working fine, but I’m concerned about a visitor uploading a virus, malware, or some harmful script to my site. How does your plugin handle this? Does it do a virus or malware scan before the actual upload?



    • Tom McFarlin

      Hey Laura,

      The plugin itself doesn’t perform any type of virus or malware scan, but it only allows images (JPEG, JPG, GIF, and PNG) to be uploaded. This doesn’t mean that someone clever couldn’t come along and attempt to inject a bad file masquerading as an image, but the file itself wouldn’t be able to be executed whenever the image loads because it’s simply rendered as an image element.

      If it were not a real image, then it would just display as a broken image.

      Hope this helps!

  25. Misty Dietz

    Hi Tom,
    This plug-in sounds wonderful. Is it only for My blog runs on

    • Tom McFarlin

      Unfortunately, it’s only for – if you ever go that route, let me know and I’ll be glad to help you out!

      • Misty Dietz

        Bummer. Thanks anyway! :)

  26. Edwina Elizabeth

    Hi there,

    It’s not working for me for some reason? Like one of the the other comments made I do have the free Spam plugin but there isn’t anything enabled on it that should prevent it from working?!? Can you help?

    Thank you


    • tommcfarlin

      Hey Edwina,

      If you don’t mind – shoot me a link to your site (or a post that doesn’t appear to be working) as well as information on the theme you’re using.

      Would be happy to take a look!

    • Edwina

      My blog is and the theme is Greyzed theme for WordPress.

      Thank you

      Edwina ;)

      • tommcfarlin

        I just tried posting a comment with an image, but the Spam Free plugin through up an error message. The first thing I’d try is disabling that plugin to see if the problem still persists.

        Let me know!

        • Edwina

          Hi Tom
          I’ll try that. Can you recommend a different free spam catcher plugin that I’ll be able to use? I was inundated with crappy comments and spam before I installed it. I know that I can change settings to have the comments available to registered users only or I can reduce the links allowed but I think this put off comment makers.



          • tommcfarlin

            I recommend using Automattic’s Akismet. In my opinion, it’s the best spam comment plugin that’s available and it’s just a matter of installing it – it takes care of the rest.

            • Edwina Elizabeth

              Brilliant stuff Tom … you know what you are? … you’re a superstar … Thank you!!!

  27. Jessica

    Hi! Love your plugin, but I seem to be having problems with the images appearing at the actual size instead of smaller. See the bottom of this post for an example:

    I am assuming that my theme must be interfering. Any ideas about what I should change? Thanks for your help. I really want to use this!

    • tommcfarlin

      Yeah – I can provide some guidance. It’s a small CSS change that will need to be made. Shoot me an email and we’ll try out a few things!

      • Jessica

        Thanks so much for your help! It’s working perfectly now. I’m very impressed with both your plugin and willingness to help.

      • Christian Silk

        Hello Tom, I am having the same problem with the image not scaling. You can see the problem on this page in the comments: Any suggestions of what might need tweaking?

        • tommcfarlin

          Yep – if you add this line of code to your theme’s style.css file, then you should be good to go:

          .comment-image img { max-width: 100%; }

          Let me know if this doesn’t resolve it!

          • Christian Silk

            Looks like that worked. Thanks so much for the help and great plugin!

  28. Corinne Sheltren

    Hi Tom,

    LOVE LOVE LOVE what you have created for us! And, I think I am in the same boat as some other people in that images uploaded are coming in at full size, instead of fitting within the comment page layout. I see that a few other people were having the same issue however I cant see what the resolution was.

    Any help is greatly appreciated!

    • tommcfarlin

      Hey Corrine,

      If you shoot me an email including a link to your site – specifically, a link to the post with the image – I’ll be sure to take a look and see if I can offer some help.

  29. Catta

    I just get this message when i try to install. I use WordPress 3.4.2. Theme Twenty Ten. What can i do?

    “Plugin could not be activated because it triggered a fatal error.”

    • tommcfarlin

      This likely has to do with a conflicting plugin as Comment Images was developed using WordPress 3.4.1 and 3.4.2.

      I’d recommend deactivating all plugins, activating Comment Images, then activate your other plugins one-by-one until you see the message again.

      If and when you do see it, that would be the offending plugin.

      Hope this helps!

      • David

        I’m also getting the “Plugin could not be activated because it triggered a fatal error.” I’ve tried deactivating all other plugins, but still get the error when I try to activate it by itself.

        • tommcfarlin

          David – what version of WordPress are you using and what version of the plugin are you trying to install?

  30. Paul Rosenthal

    This is very interesting Plugin.
    But how to make automatically resize uploaded image shown in post to max 320 px with (link can be on Full Size).

    • tommcfarlin

      Hey Paul – right now, that’s not an option. It’s in the roadmap, but I haven’t had a chance to implement it yet.

  31. Sebastiaan Pijnappel

    Hi Tom (and others),

    Love your plugin, but have a question about the image size. I know the current version doesn’t offer control over size, but images in my comments come up tiny (see For my purpose the should ideally be the width of the comment box. Ideas?

    • tommcfarlin

      Hey Sebastian,

      You have a style in your style.css that’s causing this to happen. Specifically, you have:

      .post table img, .org_comment img { max-width: 200px; }

      And that’s making it show up small.

      I’m hesitant to recommend it removing it because it’s in the theme’s stylesheet meaning it probably impacts something else. Instead, I’d recommend making this change to plugin.css for Comment Images:

      .comment-image img { max-width: 100% !important; }

      • Sebastiaan Pijnappel

        Tom, thanks a lot for your quick response and help. Making the change to plugin.css does sound like the better solution. Unfortunately plugin.css is not showing up in the Styles list in the editor. Styles.css is the only sheet listed. Sorry for taking up your time with my noob questions, but hopefully you’ll be able to tell me where to find it.

        • tommcfarlin

          Okay cool, no worries. You should be fine making the changes in your theme’s style.css file. If you add it to the bottom of the file, then you should be good to go!

  32. Dave

    Didn’t work with my site, nor the new updated wordpress

    • tommcfarlin

      Hey Dave,

      The plugin definitely works with the latest version of WordPress. If you could, please let me know the answers to the following questions and we’ll see if we can get it sorted!

      – What theme are you using?
      – What version of my plugin are you using?
      – Have you tried deactivating all plugins save for the one that isn’t working and see if that resolves the problem?
      – If so, can you please provide a link to your site?
      – Please provide the clearest steps for reproducing the bugs as possible
      – Please do not provide me the login credentials to your site as there are legal implications around this.

  33. Yoram Zara

    It seems than when your plugin is active it causes that any plugins upgrade notices in the dashboard do not show. When you deactivate the plugin the notices appear.
    Can you fix this?

    • tommcfarlin

      Yep – already done. Grab the update here.

      • Yoram Zara


        Thanks for the great plugin. I wish to request a feature. By default, the text is:
        Select an image for your comment (GIF, PNG, JPG, JPEG):
        My site is not in English. So, I go into the plugin code and change the text. The thing is, that each upgrade I have to redo this. Can you allow to set the text in the dashboard so that it will stand upgrades, and allow to easily customize the text?

        • tommcfarlin

          Noted – I didn’t know file types were localized as well.

          Rather than exposing an options panel, I’ll localize these strings and then make them translatable using POEdit.

          Thanks for this request – very helpful. Will aim to have this done by the end of the week.

          • Yoram Zara

            You might get inspiration (and some useful code) from 2 plugins that did similar things but are not maintained anymore:
            Comment Image
            This plugin allows to set the “Image field label” in the dashboard
            Another plugin, which is no longer in the depository is Easy Comment Uploads
            Here is a screenshot of its dashboard. It offers a lot of customization.
            I can send you a copy of this plugin if you wish.

            • tommcfarlin

              Thanks for the heads up!

  34. Yoram Zara

    I upgraded to 1.7. The image inserting text went back to English. In the release notes you mentioned :”Adding support for international languages in the file types”. Can you please clarify what should I do to have the text in another language so it will survive updates?

    • tommcfarlin

      Sure thing: Follow the instructions in this article and you’ll be good to go. It’s really easy and will be compatible with future upgrades.

      • Yoram Zara

        You must be kidding. I am not a developer. Just an average user. Just scrolling through the page got me dizzy.

        • tommcfarlin

          I’m not trying to make this any more difficult than it needs to be. Unfortunately, this is just the way that translations in WordPress work.

          All that’s required is this. Trying to make it as simple as possible for you:

          1. Download POEdit. It’d send you a direct link to the file but I don’t know what operating system that you use.
          2. Open POEdit
          3. Locate plugin.po the file in comment-images/lang/. Do this just like you would open any other text file or any other file on your computer.
          4. Click on each item in the top window. This will allow you to change the English string to your language equivalents.
          5. Save the file. This will create a file. Upload this file to your server like you would any other file into the lang directory where the plugin.po exists.
          6. Done.

          I’m genuinely not trying to make this any more difficult for an average user than it needs to be – this is just how translations currently work in WordPress.

          If you need more help, then let me know.

          • Yoram Zara

            Can you use to make transelations to your plugin? I am willing to do it in Hebrew.

            • Tom McFarlin

              Hey Yoram – I’d be willing to do this on a contract basis; however, this isn’t how the core WordPress translations work.

              Because this is a free plugin and because that I try to stay as close to WordPress plugin standards (both for coding, for support, and for localization), I’m going to stick with the process they’ve recommended.

  35. Yoram Zara

    I really tried. I did not manage to do it. I guess I will keep changing the text in the plugin editor each time I upgrade. I suggest you give an option to change the upload text in the dashboard like the other plugin I mentioned do. It would sure be friendlier.

    • Michael Novotny

      While that might be friendlier, it is not a WordPress best practice.

      Using the translation process as outline by the Codex is the industry best practice.

  36. Farhan

    Hey Tom,

    Many thanks for the amazing plugin, The code is very nicely commented as well.

    I needed to change the plugin to allow zip and rars and also save the file name that was pretty simple enough!

    Now if possible I just need help to let the plugin allow multiple files per comment. I’ve played around with the fucntion save_comment_image but haven’t had luck due to my not so great php skills. Can you post a quick dirty solution for this ? Would help lot of people I am sure :D

    • Tom McFarlin

      Hey Farhan,

      Unfortunately, this would take longer than a comment to provide. If you’re interested, I do offer custom development or consulting for this kind of stuff.

      Definitely more than happy to help you out.

      If you’re interested, you can shoot me a note here and we can talk about it.

      Thanks for the nice comments on the plugin!

  37. SharmPRO

    Good stuff!

    I’m using the plugins and like the easiness it solve my problems. With a little javascript / jQuery / and Css I manage to re-style the upload field that was looking ‘poor’ .

    Wouldn’t better to change the code that generate the html code for the upload field? As beginner in WordPress I’m afraid there will be some problem when upgrading due to bad coding.
    I can provide some example and screenshot.

    Thank you


    • Tom McFarlin

      Hey Stefano,

      Good question! This is usually better for an email, but the short answer is that I won’t be providing much styling for the form simply because I want the plugin to be compatible with as many themes as possible.

      As such, I can’t provide a lot of styling so the best thing to do is to provide the basic form and let users and/or designers / developers work on the styles.

      • SharmPRO

        Hi, sure the ‘no-styling’ option is the most compatible, but…
        A minimalistic solution that can leave the styling ‘open’ could be:
        hide the file upload input field
        create 1 button that clicked will trigger the hidden file upload field
        create 1 button that clicked will reset the hidden file upload field
        create 1 field read-only that will display the file to upload name

        If you think it’s worth a look i can send you the relative files with this solution ready without touching your code, let me know.

        Another question, any future dev on ‘crunching’ the uploaded images? If the images uploaded are heavy they’ll impact on page load and as I’m permanently connected via UMTS/3G mobile network (no ADSL nor land-line) i can tell you it will ‘resize’ the great value of your plugin.



        • Tom McFarlin

          I appreciate it, but for now this is how I’m likely going to leave the plugin. The justification is for several reasons.

          • I only want the user to have as few clicks as possible. If this means include only one input field, then that’s all I’m going to do.
          • The idea of introducing a cancel button isn’t bad, but it should only be visible after the user has selected a file and should disappear when there’s no file defined.
          • The issue of showing/hiding the input field adds an unnecessary click making more work for the user.

          All that to say, I think may look into the ‘Cancel’ option in a future release.

          Also, yep – I’m definitely planning on adding an automatic resizing feature in future releases. It’s one of those things that I just haven’t had a chance to work on yet.

          Thanks for the thoughts, Stefano!

  38. Mike

    Tom, brilliant plugin, any idea when to expect the update for seeing the image in moderation?

    • Tom McFarlin

      Unfortunately, no – I’ve got a big backlog for this program and I’m hoping to make incremental improvements on it, but paying gigs have to take priority ;).

      It’ll be available for updates in the dashboard as soon as the new version drops!

  39. Ferry


    I try in English. A few photo are too big… how can i this help?
    Thank you.


    • Tom McFarlin

      This would need to include a change to your style.css file.

      • Ferry

        Hello. Very thanks! I happy with this plugin. I have another question of this plugin. How can I the picture/photo with a CENTER position?

        Greetings Ferry.

        • Tom McFarlin

          This would require a bit of CSS. In order to provide this, I’d need to take a look at your site – it’s a bit outside the realm of standard support for the plugin, but shoot me an email and we’ll see what we can do.

  40. Yoram Zara

    Plugin conflicts and a and suggestions

    The recent upgrade gave great new features.

    In posts and comments view, it would be helpful if it would be possible to click on “Comment Image” to sort by posts and comments that have comment images.

    Plugin conflicts

    I am using 2 plugins that conflict with the recrent upgrade
    Simply Show IDs
    Subscribe to Comments Reloaded

    Each plugin has its own column in the comments dashboard. The issue is that the comment image displays on those columns too now.

    I tried 3 other plugins that show the comment id on the dashbord and they have all the same conflict too:
    WP Show IDs
    Catch IDs
    Reveal IDs

    Can you fix this please?

    • Tom McFarlin

      Hey Yoram,

      Thanks for the suggestions – as with all of them, I add them to a backlog to see about adding them to a future version of the plugin.

      For the issues, I installed every single plugin that you suggested, applied a fix, and tested locally. Comment Images 1.8.2 should appear shortly as an upgrade in your dashboard.

      Thanks for the heads up!

      • Yoram Zara

        The recent update fixed the issue. Many thanks.

  41. Brandon


    Great plugin. However it just stopped working for me. I changed the permissions on the uploads folder to 777 to test that and it worked once. Now it’s not. Any ideas?

    Also, I am in desperate need of my readers having the ability to leave an image WITHOUT comment text as we do ticket giveaways where user just need to leave an image as a comment.

    Was this added to the new version? If not, is it something I can fix?

    Any help would be greatly appreciated!


    • Tom McFarlin

      Hey Brandon,

      When you upgraded the plugin, did it stop working after that? Or did it stop working prior to the upgrade? This is something that’s outside the typical realm of support so if you can contact me via email we’ll see what we can do.

      Also, the feature of not being able to comment without text hasn’t been added yet, but it is on the roadmap for within the next two releases. I’m not sure of a timeline for that yet, though.

  42. Betty Brown

    I have read the comments and answers here about the image size and tried changing the settings in the plugin.css file located in the /plugins/comment-images directory. No matter what I changed the settings to the image remained the same size which is too large.

    Is there another file I should be editing in addition to or instead of this one?

    thank you,

    • Tom McFarlin

      This should be all that’s required but other plugin and theme files can cause problems.

      Shoot me an email with a little more detail. I’ll take a look at your site and see what we can do!

  43. Peter

    Hi Tom,
    After I installed 1.8.2, I cannot post new comments. I am new to your plugin. Please help, thanks.

    • Tom McFarlin

      Hey Peter,

      This sounds like it may be a conflict with a theme or a plugin as this is the only reported incident that I’ve seen.

      Please shoot me an email and let’s see what we can do!

  44. John

    Hi Tom,

    Great plug in that we would like to use. But my big worry is that many of our readers are not tech savvy and will upload huge images right out of the camera, which will clog up our server.

    If you added automated re-size on upload, we would use it in a heart beat. How about making that a premium feature with a annual maintenance charge? Free without, premium with. I for one would be happy to pay for that and the revenue would make it worth your while to focus more time on it.

    • Tom McFarlin

      John – your use case is one of the ones that I think most about when working on this plugin. There’s a fine line to walk between making sure everything is as user friendly as possible without actually taking control away from those who are more comfortable with it.

      That said, I try to err on the side of less technical users, so this kind of feedback is valuable.

      And your timing is actually really funny as I’m beginning to move in the direction of charging for support for plugins. I’ve yet to work out the finer points, though.

      Anyway, I’ll definitely take your feedback into consideration and see that I can do for the next major release.

      Thanks John!

      • John

        Hi Tom,

        Thanks very much for your quick reply. One other suggestion for the next release:

        Have the option to set a flag so that all comments that contain an image are automatically put in the moderation queue, even if the blog does not generally use automatic moderation. This would be the same way that WP kicks all comments with more than one or two links into moderation. This would be a great feature for site like ours that have not found moderation necessary on all comments but would like to make sure that images are appropriate before posting.

        As to charging for your time. My feeling is that of course you should! I really like the model where there is a free version of the plug in, so we users can get a feel for it, and then a premium version with features like these we are talking about, that we pay an annual fee for that includes a reasonable amount of support. I, for one, would be happy to pay say US$40.00 a year for a plugin like this as long as it was well maintained and supported.

    • Graham

      We had the same problem and solved it with some custom CSS in the theme limiting file upload size. Works great.

  45. Yoram Zara

    Issue with large images from 1.8 onwards

    My live site is
    My tsest site is

    They are duplocates with one difference – the live site has version 1.7 of your plugin and the test site has 1.8.2

    1.8.2 has issues when uploading large images. They appear in several places and look strange.

    I would suggest you upload a large image to the same post on both sites and see what happens:



    Can you please fix this?

    • Tom McFarlin

      I’ll take a look at it, but can you go ahead and upload what you consider to be a ‘large’ image to the test site so I can review what it looks like?

      This is the first I’ve heard of the issue so I’d like to see it in action to provide as much help (and updating) as necessary.

      Thanks Yoram!

      • Yoram Zara

        I guess it is not a question of size

        It does not happen in 1.7

        • Tom McFarlin

          This looks like it might be a theme related issue. Can you try with another theme and see if the problem persists?

          I can’t recreate this on my end.

          • Yoram Zara

            You are probably right. I guess I will stick with 1.7 until I choose to change my theme. Thanks

  46. Jamie

    I have just installed you life saving plugin….
    However the writing conflicts with the filed boxes and the writing of my existing comment box, is there a simple solution to this?

    thanks a million in advance


    • Tom McFarlin

      This is probably a result of conflicts styles with a theme and/or a plugin.

      If you shoot me an email with a link to your site, I’ll take a look and see if it’s an easy solution.

    • Tom McFarlin

      Hey Jamie,

      I’ve sent you three emails but it looks like they’re likely going to spam. Please double-check to see if you see them there.


  47. Jane

    Hi Tom,

    Regarding hiding the upload-image functionality on certain pages, until that gets added in, I’m wondering if adding a css style in my page would work. Like targeting the form and using display: none? Thoughts?

    And I agree with John, I would easily pay for a premium version with automatic optimizing of huge images.


    • Tom McFarlin

      I’m slowly working through introducing a premium version of plugins. It will be a while before I’m able to finish this, but I appreciate the feedback!

  48. Jane

    Hi Tom,

    My image uploaded sideways. Is there a fix for that?


    • Tom McFarlin

      Unfortunately, this has to do with the image that a user is uploading – not the plugin. They’ll need to manually rotate the image themselves prior to uploading it.

  49. turkdisk

    When I try to uploading image;

    Warning: preg_match_all() expects parameter 2 to be string, object given in /home/lovelet/public_html/isg/wp-content/plugins/comment-images/plugin.php on line 379

    Warning: Cannot modify header information – headers already sent by (output started at /home/lovelet/public_html/isg/wp-content/plugins/comment-images/plugin.php:379) in /home/lovelet/public_html/isg/wp-includes/pluggable.php on line 876

    Whats the problem ?

    • Tom McFarlin

      This normally means that your web host doesn’t support a function that’s used in the plugin.

      If you want to shoot me an email with the details of your hosting environment, I can let you know if this is the problem or not.

      • anonymous user

        Just thought I would let you know that I am having the exact same error. WP Seeing if I can work through it. Will report back.

        WP v3.4.1
        CI v1.8.2
        Rackspace VPS

        This is the area in question:
        // And strip out the name of the image file so we can save this to the meta data
        // Regex is usually bad for this, but WordPress is predictable in the format
        preg_match_all( “#[^]#”, $img_url, $matches );
        $comment_image_file[‘url’] = $matches[0][0];

        • Tom McFarlin

          Thanks for the heads up. I’ll make a note to review this and see if I can reproduce it in a future release.

  50. Edgar

    Feature request: “Mark image as inappropriate” tab that let users do just that. I saw it on another comment images plugin (, ) and thought it’d be a great addition on this one

    • Tom McFarlin

      Good idea. Adding this to feature requests and will see what I can do in a future release.

  51. Jonni Good

    Thanks for changing the plugin so we can now see the images when we approve the comments – this was a big help. Now, however, I’m having a problem with people uploading huge images. They show up the right size in my blog, but the files are huge and are slowing down my page loads. Is there a way to keep people from uploading anything larger than, say, 800 pixels wide?

    • Tom McFarlin

      I could introduce a feature like this, but the problem is that this isn’t a feature that would necessarily affect everyone. Instead, it’s more of a custom feature.

      If you’re interested in that, shoot me an email and we’ll see what we can do.

  52. Yoram Zara

    Which light box plugin works well with “Comment Images For WordPress”?

    • Tom McFarlin

      I don’t really have any recommendations. You’ll have to try out what’s available and see if you can find one that works best.

      • Yoram Zara

        I tried several plugins and I could not make none of them to work with your plugin. Is there a conflict? Did you ever have a light box plugin that worked with your plugin? Did anyone on this thread succeed with making “Comment Images For WordPress” work with any light box plugin? I would be happy to hear

        • Tom McFarlin

          I’ve personally never tried any of them – most of them primarily look to add a lightbox effect on images in the post since that’s where they most commonly appear.

          I’ll leave it up to others to share if they’ve had success, though.

  53. Megan

    Is there a way to add a different file type to the plugin? I need my end-users to be able to upload and display a PDF in their comments.

    Thanks for the help too. :)

    • Tom McFarlin

      Hey Megan,

      Got your email – we’ll chat from there!

  54. Marc Horn

    Hi Tom,

    The plugin was working great.

    Unfortunately since I ran w3 cache it uploads the images to folder but no longer displays them in the reply?

    I deactivated it but still not working?

    Have you had this problem before? and if so how do I overcome it?


    • Tom McFarlin

      Hey Marc,

      Unfortunately, I’ve not seen or heard of this problem until now. It would seem odd that total cache is moving it to a new location, but if it’s rewriting the location, then that may be why it’s not showing up.

      I wish there was more than I could add but that’s about it.

  55. Per


    I have an issue with your plugin, its working fine for a desktop version but not for mobile version like WP Touch Pro. Comments without attached image can’t be done as we get a popup error message. Can you investigate and see if that can be fixed?

    Regards Per

    • Tom McFarlin

      Hey Per,

      Unfortunately, this is more of how the two plugins interact and it’s not an easy fix. It’s something that I’d eventually love to resolve and I’ve logged it in my development notes, though there’s no timetable as to when this particular feature will make it in.

      Thanks for the heads up – I do take these requests seriously and appreciate the feedback :).

  56. Craig

    hello, i very much want to give my users this feature, but no matter what i do i cannot activate the plugin without getting the “trigger fatal error” message. Have tried deactivating all other plugins, switching themes (i use Platform Pro) and no luck. Any thoughts?

    • Tom McFarlin

      Hey Craig,

      Sorry to hear you’re having an issue with the plugin! This is the first that I’ve heard of this particular issue as it’s been tested up to WordPress 3.5.1 with no problems.

      What theme are you using and what version of WordPress are you using?

      I may be able to provide a little more information based on that.

      • Craig

        Wow, thanks for the speedy reply. My theme is PlatformPro By PageLines Version 1.6.0 and I’m using WordPress 3.5.1.

        I am able to install your plugin, Comment Images, but when i try to activate it i get this message: “Plugin could not be activated because it triggered a fatal error.”

        As I noted earlier, I tried deactivating all of my other plugins and using other themes, such as Twenty Twelve, but still get the same message.

        Many thanks for your attention.

        • Tom McFarlin

          Okay, cool – and finally, what version of the plugin are you attempting to install? Is it 1.9?

          • Craig

            yes, 1.9, have tried several times and get the same msg every time when trying to activate: “Plugin could not be activated because it triggered a fatal error.”


            • Tom McFarlin

              Hey Craig,

              Shoot me a note here and we’ll take this into email.

  57. Aurel


    I just found your plugin and I find it really well. A small question still comes to mind at the security upload. The script is it secure enough to prevent malicious uploads?

    Another thing, the images are not automatically deleted when you delete the comment or the media?

    • Tom McFarlin

      Hey Aurel,

      The plugin only allows files in the format of PNG, JPG, JPEG, and GIF to be uploaded. This doesn’t mean that someone highly malicious couldn’t game the system, but I’ve put every safeguard in place that I possibly can to handle this particular issue.

      And right now, the images are not deleted when the plugin is deactivated. This is primarily so that if users opt to re-activate the plugin, the images will appear exactly as they did when the plugin was running the first time.

      • Aurel

        Thanks for your answer.

  58. Micky

    hi tom,
    I tried your plugIn and it worked fine. Imgs show up in the media library as well.
    When I delete the img uploaded via the plug in the lib it disappears from the lib but when I check the folder on the server it’s still there. Tried several jpgs.
    (Wp 3.5.1 – responsive theme – mac os 10.6 – safari)

    did you consider an image resize for the plugIn?


    • Tom McFarlin

      Hey Micky,

      The plugin doesn’t delete images on de-activation. At one point, it did, but users wanted the images to persist so if they reactivated the plugins, the images would re-appear.

      Hope this helps!

      • Micky

        Hi Tom,
        I was saying that it doesn’t delete images when you want to delete them: if you delete them from the lib you want them to be deleted from the server too, don’t you?

        • Tom McFarlin

          At one time, yes, but I had several feature requests to keep the images on the server should they re-activate the plugin.

          That said, I’ll look at restoring them in the media uploader in a future version.

          Thanks Micky :).

  59. Bence


    I try to use your plugin (version 1.9) in and it is working almost well. The only weird thing is that, if I use it at any of the posts, it is working great. But if I try to upload an image at the “csevegőszoba” page (which is a page with comments), it simply can not upload anything. It does not show anywhere, no error message, nothing.
    The weird thing is, that I simply made that page with inserting the following lines, so it is using the original commenting system, like the posts, where it is working great:
    $withcomments = “1”;

    • Tom McFarlin

      I can’t really offer any suggestions without diving deeper into the issue which would require a level of support that isn’t typically offered for a free plugin.

      I’m happy to help, so if you’re interested, please shoot me an email!

      • Bence


        I found the solution. On the wrong page the template called the comment_form function with an array, but it could not pass the post’s ID. Now I call the function like that: comment_form(array(…),$post->ID); and it is working nice.

        Thank you for this nice plugin!

        Now I have to find a way to resize the uploaded images on the fly :) (I will try to combine your plugin with the GD library like shown here: )

        • Tom McFarlin

          Thanks for sharing the comment :).

          …and yeah, resizing is coming whenever I get a chance to work on the plugin again. It’s been a popularly requested feature!

  60. Drew

    Thanks for the plugin!

    I’m trying to display some comments on a separate page using the info here:

    and wondered what your recommended inclusion would be to have the comments rendered with the images that are now in the comments thanks to your plugin.

    • Tom McFarlin

      The plugin uses the comment_form hook, so if you’re implementing the plugin correctly, then you should be good to go.

      It also uses wp_insert_comment and comments_array but those should be managed by WordPress, so you shouldn’t have to worry about that too much.

      Hopefully this answers your question. If not, let me know (as I may have misunderstood it!).

      • Drew

        Here’s where I’m trying to use it:

        I want those comments with images to only show up on this page:

        Right now the comments are there, minus the images.

        • Tom McFarlin

          Oh, I see!

          If you use this call:
          get_comment_meta( $comment->comment_ID, 'comment_image' ), it will return an array (say you store it in $comment_image if there’s a comment associated with it).

          You can then use that array to display an image by using the URL key: $comment_image['url']

          • Drew

            I’ll give that a try, thanks!

  61. Josoroma

    Hi, it lloks like a piece of art.

    But with Responsive Theme, is not uploading or displaying any image at all.

    Thanks in advance.

    • Tom McFarlin

      This may be an issue with the theme in question. I’d have to take a look at it which falls under premium support as I can’t diagnose (or fix it) without digging in deeper. If you’re interested, let me know.

  62. Jon Sayer

    Hello Tom,

    I cannot get your plugin to work on my website. It just doesn’t look like it is saving the image path to the post? Please could you take a look at the following link.
    Many thanks

    • Tom McFarlin

      Hey Jon,

      This kind of support usually extends into a premium level of support. If you’re still interested, shoot me an email here and we’ll figure it out!

  63. Eddy

    Hi Tom,

    is there a way to make the image appear in a custom comment loop?

    I tried a couple of things but I can’t get it to work..

    For example i tried:

    foreach($comments as $comment) :
    $comment_image = get_comment_meta( $comment->comment_ID, 'comment_image' );

    • Tom McFarlin

      It is possible, but this type of work usually extends beyond normal support. If you’re interested, shoot me a quick email on my contact page and we’ll go from there!

  64. Chris Wilson

    Does the plugin work with Jetpack comments? I have installed it on my site ( activated it, “enabled” it in the post options and yet I can’t see it as an option. I wondered if using Jetpack comments might cause an issues.

    • Tom McFarlin

      Currently, it does not work with JetPack comments. That’s something that I’d love to integrate, but I’ll have to wait until I have time to revisit the plugin.

  65. Ivan

    I have not any upload button on the I can choose but not upload image.

    • Tom McFarlin

      There’s no upload button – just a file selector. The image will be uploaded once you click ‘Submit Comment.’

      • Ivan

        Tom, I uploaded and tried to send a very simple image, a button.jpg in my Nothing. What can I do?

        • Tom McFarlin

          When this happens, it’s normally a result of a configuration setting on the server or a conflicting plugin.

          This is something that I can look at, but it normally goes beyond the base level of support.

          If you’re interested, please shoot me an email.

  66. mufti

    Nice plugin, this what I am lloking for. I want to create community site like gawker

    • Tom McFarlin

      Sounds neat :)

  67. Eddie


    The plugin is not working on my website. Can you help me please?


    • Tom McFarlin

      Hey Eddie,

      Sorry about that! Unfortunately, there are a number of reasons that this plugin may not be working – could be anything from server-side restrictions to conflicting plugins or theme code.

      Without knowing more, I can’t offer much help. Additionally, since this is more of a one-off case, this falls more under premium support, so if you’re still interested, please shoot me an email and we’ll see what we can do.

  68. Jacob Cousino

    Thanks for the plugin, too bad it doesn’t work with p2 theme. That theme is very popular with collaborative/community blogs, and many of those kinds of blogs would also like to be able to add images in comments. Basically this plugin would be a good match with P2.

    • Tom McFarlin

      This is one of the biggest requests that I have.

      I’m definitely interested in adding this feature, but since it’s a free plugin it’s pretty low on the priority chain – for now :).

  69. Jacob Cousino

    It’s kinda funny because what I want to do with the P2 theme, the end result is basically turning WordPress into a “chan” site. Anyways, adding images to comments without needing to visit a site like imgur and copy and paste the HTML is nice.

    • Tom McFarlin

      P2 is on the roadmap – unfortunately, no plan for a release yet.

  70. Annalisa Andriani

    How can I change the position of the input image box?
    I would like it is above submit Comment button.
    Best regards.

    • Tom McFarlin

      Hey Annalisa,

      That falls under premium support. If this is something you’re interested in having customized in your version of the plugin, let me know!.

      • Annalisa Andriani

        How much the customization costs?

        • Tom McFarlin

          Typically around $50 – but it depends on how complicated the existing theme and resolving the problems.

          That’s been the average rate, though.

          • Annalisa Andriani

            This is the theme
            Let me know the precise cost ($ 50 is so much. Can not be less than $ 50? :-( )

            • Tom McFarlin

              Unfortunately, that’s as low as I can go.

© 2020 Tom McFarlin

Theme by Anders NorenUp ↑