diff --git a/image_caption_filter.module b/image_caption_filter.module
index b3f68d6..1f4914c 100755
--- a/image_caption_filter.module
+++ b/image_caption_filter.module
@@ -63,7 +63,7 @@ function doImgTitles($matches) {
   $title = $matches[1];
 
   //Get the width out of the <img> tag
-  preg_match ('/width: (.+?)px/i', $imgText, $matches);
+  preg_match ('/width=\"(.+?)\"/i', $imgText, $matches);
   $width = $matches[1];
 
   //Get class out of the <img> tag
