I'm having a time migrating images from Wordpress to Drupal with the Migrate 2.4 module. Here are my mappings:

$this->addFieldMapping('destination_file', 'images');

The images come from a function that queries the wp_postmeta table then returns the result to the prepareRow() function.

function getImages($row) {
$post_id = $row->id;
$results = db_query("
  SELECT pm.post_id, pm.meta_key, pm.meta_value FROM streetroots_wp.wp_postmeta AS pm LEFT JOIN streetroots_wp.wp_posts AS p ON pm.post_id=p.id WHERE p.post_parent = $post_id AND pm.meta_key='_wp_attached_file';");

$images = array();
foreach($results as $result) {
  $images[] = $result->meta_value;
return !empty($images) ? $images : NULL;

This basically returns the image name and relative path from the wp_postmeta table something like '2012/05/figure1.jpg'. I then use prepareRow() like this:

 function prepareRow($row) {
$row->images = $this->getImages($row);

I'm guessing there's something funky with how I'm using the new-ish migrate module that handles the file fields. The sql is outputs the file names correctly but it doesn't seem like the images are getting copied over. This is a Drupal 7 using Migrate 2.4. Any help is appreciated.