diff --git a/src/PHPImageOptim/Tools/Gif/Gifsicle.php b/src/PHPImageOptim/Tools/Gif/Gifsicle.php
index <HASH>..<HASH> 100644
--- a/src/PHPImageOptim/Tools/Gif/Gifsicle.php
+++ b/src/PHPImageOptim/Tools/Gif/Gifsicle.php
@@ -15,7 +15,7 @@ class Gifsicle extends Common implements ToolsInterface
     public function optimise(): ToolsInterface
     {
         exec($this->binaryPath . ' -b -O2 ' . escapeshellarg($this->imagePath), $aOutput, $iResult);
-        if ($iResult !== 0) {
+        if ($this->stopIfFail && $iResult !== 0) {
             throw new Exception('GIFSICLE was unable to optimise image, result:' . $iResult . ' File: ' . $this->imagePath);
         }
Update Gifsicle.php