How do I migrate an image field with migrate 2 module on drupal 6
Okay so I figured out what was wrong. I needed to put the site url in front of the path in my db.

  public function prepareRow($current_row) {

    $source_id = $current_row-&gt;page_id;


    // This adds the images to the image_gallery field
    $result = db_select('migrate_ror_pages_images', 'pic')
      -&gt;fields('pic', array('filename_path', 'title'))
      -&gt;condition('page_id', $source_id)
      -&gt;execute();
    $current_row-&gt;images = array();
    foreach ($result as $row) {
      $image_data = array(
       'path' =&gt; $row-&gt;$GLOBALS['base_url'] . filename_path,
       'alt' =&gt; $row-&gt;title,
       'title' =&gt; $row-&gt;title,
       'description' =&gt; $row-&gt;title,
      );
      $current_row-&gt;images[] = drupal_to_js($image_data);
     }


The line that needed to be changed was the one regarding the path to the image. I was using a relative path /sites/default/.../filname.jpg and I needed to use a full path:

           'path' =&gt; $row-&gt;$GLOBALS['base_url'] . filename_path,


So if you are trying to import images/files you will need a full path to the image not a relitave one!

Hopes this helps someone.

//Craig