diff --git a/advagg.install b/advagg.install
index bff4e18..703088c 100644
--- a/advagg.install
+++ b/advagg.install
@@ -601,6 +601,12 @@ function advagg_schema() {
         'not null' => TRUE,
         'default' => '',
       ),
+      'filesize' => array(
+        'description' => 'The filesize of the file in bytes.',
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
       'counter' => array(
         'description' => 'This is incremented every time a file changes.',
         'type' => 'int',
@@ -862,3 +868,21 @@ function advagg_update_6108() {
 
   return $ret;
 }
+
+/**
+ * Update 6109 - Add filesize field to advagg_files table.
+ */
+function advagg_update_6109() {
+  $ret = array();
+
+  // Add in timestamp column.
+  db_add_field($ret, 'advagg_files', 'filesize', array(
+        'description' => 'The filesize of the file in bytes.',
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ));
+
+  return $ret;
+}
+
diff --git a/advagg.module b/advagg.module
index b9dddf1..c16e756 100644
--- a/advagg.module
+++ b/advagg.module
@@ -939,7 +939,7 @@ function advagg_insert_bundle_db($files, $filetype, $bundle_md5, $root) {
     $checksum = db_result(db_query("SELECT checksum FROM {advagg_files} WHERE filename_md5 = '%s'", $filename_md5));
     if (empty($checksum)) {
       $checksum = advagg_checksum($filename);
-      db_query("INSERT INTO {advagg_files} (filename, filename_md5, checksum, filetype) VALUES ('%s', '%s', '%s', '%s')", $filename, $filename_md5, $checksum, $filetype);
+      db_query("INSERT INTO {advagg_files} (filename, filename_md5, checksum, filetype, filesize) VALUES ('%s', '%s', '%s', '%s', %d)", $filename, $filename_md5, $checksum, $filetype, @filesize($filename));
     }
 
     // Create the entries in the advagg_bundles table.
