--- ./app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api.php.org	2011-08-11 15:55:55.000000000 +0200
+++ ./app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api.php	2011-08-11 15:55:25.000000000 +0200
@@ -105,6 +105,17 @@
     }
 
     /**
+     * Retrieve md5
+     *
+     * @param string $file
+     * @return String
+     */
+    public function md5($file)
+    {
+        return md5_file(Mage::getBaseDir('media') . DS . 'catalog' . DS . 'product' . $file);
+    }
+
+    /**
      * Create new image for product and return image filename
      *
      * @param int|string $productId
