Comment Image

Comment Image plugin enable users to attach an image while leaving comments on WordPress blogs. Comments can be a real user generated content and with images the contribution can be more and more interesting.

Comment Image is fully automated: install it and it will add a image selection field to each comment form. In this version only JPEG image format is supported.

On the options panel there are a couple of options that can be modified: the way Comment Image add the image field and the label to be displayed near this field.

Comment Image IS NOT compatible with WordPress 3.0 in Multi Site mode.

How it works

Images submitted from users are store in the directory “wp-content/comment-image” as JPEG with a 200×200 thumbnail version. Directory is created on plugin activation.

Images are name with the comment id as name and “.jpg” as extension. Thumbnails are named with a “-tn” postfix on the name.

When comments are displayed, is an image exists for them, it will be appended (as thumbnail) after the comment text. The thumbnail is clickable and open the fullimage.

When a comment is deleted, the associated image is deleted too.

Not already implemented

There is no limit control on image sizes.

Adding image field manually

If you need full control on how the image field is displayed, automatic injection can lead to odd layout or real layout problems. You can add the image field manually modifying the theme files. It’s not for all people, but here there are basic instruction to do it.

You need to know what’s a WordPress theme, where they are located, what’s HTML and how to write it, how to move in file with PHP and HTMLmixed together.

  • Open your theme folder and identify the “comments.php” file; some poor themes do not have it, if so consider to change theme or copy the “comments.php” file from the default theme.
  • Find the “textarea” tag, usually surrounded by a “p” tag.
  • Add the tag <input type=”file”name=”image”/> under the “textarea”  and near it a label like “Add your image”.
  • Reload a single post page and note if the field appears. If so, you’re ok.

The field can be added in more fashionable way, with more HTML tags and styles.

Note for technician: I know, a form need to be of type multipart/form-data to submit a file. It’s encoding will be changed by a Javascript code. May be it’s not clean, but WordPress blog owners need to have their life made easy by plugins.

Download

Available in WordPress Plugin Directory Comment Image page.

Extras

There are some extras you can install and they contain a widget to show the uploaded images on your sidebar. Extras are reserved to members on Downloads area.

Versions, help and support

Versions and other notes are listed here. Help can be asked here.

by Stefano Lissa

43 thoughts on “Comment Image

  1. Timm

    Hallo auch dies ist ein Test über den Google Chrome Browser.
    Ich finde die Idee sehr schön. Doch bei vielen Kommentaren kann es das System sehr stark belasten.
    Mal sehen, ob ich es einsetze. Schön wäre es, wenn auch weitere Dateiformate integriert werden könnten.
    LG Timm

    Reply
  2. outsan

    Hi!
    Where is the send button?
    once the user is done chosing his file there is no (obvious)way to validate that choice before actually submitting the comment.

    Reply
  3. kashin

    can I upload picture from mobile phone?
    especially safari for iPhone

    the ‘choose file’ button is dimmed…

    best regards

    Reply
  4. Mickael

    Hello and thanx for your works.

    I have installed your plugin on my website but the image i upload don’t appear in the comment.

    I have tried all the options (wp, js, manualy) but without success…

    The field is added, the browse button works, but when i publish the comment is text only without picture.

    I’m on wp 3.4

    Thanx for your help, if you can.

    (test of inserting image in this comment)

    Reply
  5. ClaudeG

    Hi Stephano,
    this works great for blog’s comment without problems, thanks!.
    But what can I do to add it on some other place in a Buddypress site.
    I’ve placed it with other textarea but without hooks, it had nothing in the comment

    Reply
  6. Haris

    Hi Stefano,
    Apologize can’t find the Support page, so I post it here.

    I have 2 blogs in the same hosting server, the Comment Image plugin work on one blog, but not on the other. I upload the plugin and activated it, and then going to my blog Comment, I can see the upload image button, I tried to upload image, the comment can be posted successfully, but no image. I wondering how do I know my blog is in Multi Side mode? Is it something can be turn ON or OFF?

    Thank you.

    Regards,

    -Haris-

    Reply
  7. zorritos

    Dear Stefano,
    I want to use your plugin comment image, and want to use it in spanish, where could I activate the file “comment-image/languages/en_US_options.php”?
    thanks and have a hug
    Carlos

    Reply
  8. shawn

    Hi.
    Please could you assist.
    I have uploaded the plugin, but seem to be getting this error:

    Warning: move_uploaded_file(/home/large/U375FSN1/htdocs/large_blog/wp-content/comment-image/46.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/large/U375FSN1/htdocs/large_blog/wp-content/plugins/comment-image/plugin.php on line 84

    Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move ‘/tmp/phpDpG7HV’ to ‘/home/large/U375FSN1/htdocs/large_blog/wp-content/comment-image/46.jpg’ in /home/large/U375FSN1/htdocs/large_blog/wp-content/plugins/comment-image/plugin.php on line 84

    Warning: imagecreatefromjpeg(/home/large/U375FSN1/htdocs/large_blog/wp-content/comment-image/46.jpg) [function.imagecreatefromjpeg]: failed to open stream: No such file or directory in /home/large/U375FSN1/htdocs/large_blog/wp-content/plugins/comment-image/plugin.php on line 203

    Warning: Cannot modify header information – headers already sent by (output started at /home/large/U375FSN1/htdocs/large_blog/wp-content/plugins/comment-image/plugin.php:84) in /home/large/U375FSN1/htdocs/large_blog/wp-includes/pluggable.php on line 890

    Is it possible to add multiple images?

    thanks,
    shawn.

    Reply
  9. Pingback: DonsTag » Jetzt noch einfacher Bilder in die Kommentare einfügen

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>