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.