diff --git a/mimemail.inc b/mimemail.inc
index f8b4ed6..3d9bf52 100644
--- a/mimemail.inc
+++ b/mimemail.inc
@@ -456,7 +456,9 @@ function _mimemail_url($url, $embed_file = NULL) {
 
   // If we're processing to embed the file, we're done here so return.
   if ($embed_file) {
-    return $url;
+    // Remove security token from URL, this allows for styled image embedding.
+    // @see https://drupal.org/drupal-7.20-release-notes
+    return preg_replace('/\\?itok=.*$/', '', $url);
   }
 
   if (!preg_match('!^\?q=*!', $url)) {
diff --git a/tests/mimemail.test b/tests/mimemail.test
index 7b1fb97..4baa252 100644
--- a/tests/mimemail.test
+++ b/tests/mimemail.test
@@ -41,6 +41,11 @@ class MimeMailUnitTestCase extends DrupalUnitTestCase {
   function testUrl() {
     $result = _mimemail_url('#');
     $this->assertIdentical($result, '#', 'Hash mark URL without fragment left intact.');
+
+    $url = '/sites/default/files/styles/thumbnail/public/image.jpg?itok=Wrl6Qi9U';
+    $result = _mimemail_url($url, TRUE);
+    $expected = 'sites/default/files/styles/thumbnail/public/image.jpg';
+    $this->assertIdentical($result, $expected, 'Security token removed from styled image URL.');
   }
 
 }
