diff --git a/src/ImageAPIOptimizeProcessorBinaryBase.php b/src/ImageAPIOptimizeProcessorBinaryBase.php
index 9bebbe8..51a0f07 100644
--- a/src/ImageAPIOptimizeProcessorBinaryBase.php
+++ b/src/ImageAPIOptimizeProcessorBinaryBase.php
@@ -135,6 +135,10 @@ abstract class ImageAPIOptimizeProcessorBinaryBase extends ConfigurableImageAPIO
     $argument_string = implode(' ', array_map('escapeshellarg', $arguments));
     $last_line = exec(escapeshellcmd($command) . ' ' . $option_string . ' ' . $argument_string, $output, $return_val);
 
+    // As PHP caches stat-information the chance is high that getimagesize will report the old file-size.
+    // To prevent this we'll clear the stat cache.
+    clearstatcache();
+
     if ($return_val == 0) {
       return TRUE;
     }
