--- image_overlay.inc	Sat Dec 03 20:09:08 2011
+++ image_overlay.inc	Fri Jan 13 13:18:00 2012
@@ -154,13 +154,13 @@
 
     // Normal, second image goes on top of the first
     if (!$reverse) {
-      $layer_filepath = $layer->source;
+      $layer_filepath = drupal_realpath($layer->source);
       $image->ops[] = "  \"$layer_filepath\" $geometry_arg $compose_arg $alpha_arg  -composite ";
     }
     else {
       // If in reverse, we cannot stop the first image from being the
       // first in the imagemagick queue. the +swap argument seems to be what we need.
-      $layer_filepath = $image->source;
+      $layer_filepath = drupal_realpath($image->source);
       $compose_arg = ' +swap';
       $image->ops[] = "  \"$layer_filepath\" $geometry_arg $compose_arg $alpha_arg  -composite ";
       $layer->ops = array_merge($layer->ops, $image->ops);
