Came across the same problem, found this issue, added the bits and pieces together and found a solution that works for me. Here it is!

Okay, so just to summarize the last two comments into one fool-proof (I think) solution:

1. Open modules/image/contrib/image_attach/image_attach.module in your favorite editor
2. Copy the entire function theme_image_attach_body and paste it into your template.php
3. Add the following code exactly before the return-statement:


$output .= '<div class="image-attach-caption">' . $image->title . '</div>'."\n";


Resulting in the following function (added a little comment as well):


function mytheme_image_attach_body($node, $iid) {
  $img_size = variable_get('image_attach_size_body_'. $node->type, IMAGE_THUMBNAIL);

  if ($img_size != IMAGE_ATTACH_HIDDEN) {
    drupal_add_css(drupal_get_path('module', 'image_attach') .'/image_attach.css');

    $image = node_load($iid);
    if (!node_access('view', $image)) {
      // If the image is restricted, don't show it as an attachment.
      return NULL;
    $class = 'image-attach-body' . ($image->status ? '' : ' image-unpublished');
    $info = image_get_info(file_create_path($image->images[$img_size]));

    $output = '<div style="width: ' . $info['width'] . 'px" class="' . $class . '">';
    $output .= l(image_display($image, $img_size), "node/$iid", array('html' => TRUE));
    $output .= '</div>'."\n";

    // theme override: added this next line for displaying the CAPTION
    $output .= '<div class="image-attach-caption">' . $image->title . '</div>'."\n";

    return $output;


Don't forget to replace "mytheme" with the machine-readable name of your theme.

Note that the caption is wrapped in a div with class "image-attach-caption".

Now the caption may appear at the top of your article, instead of under the image. This is because css that comes with image_attach adds a float:right to the img-tag, instead of the whole parent-div. The solution which worked for me (but might not work entirely satisfactory with multiple images):

Add the following CSS-code to your theme's CSS:


.image-attach-body {
/* override module css */
float: none;
margin: 0px;

.all-attached-images {
float: right;
margin-left: 1em;

.image-attach-caption {
...CSS definitions for your caption...


This was done using Drupal 6.16 with Image 6.x-1.0-beta5.