diff --git a/Convertor/Convertor.php b/Convertor/Convertor.php index 7987f3e..2961170 100644 --- a/Convertor/Convertor.php +++ b/Convertor/Convertor.php @@ -126,6 +126,10 @@ public function convert(string $sourceImageUri, ?string $destinationImageUri = n $sourceImageFilename = $this->imageFile->resolve($sourceImageUri); $destinationImageFilename = $this->imageFile->resolve($destinationImageUri); + if(!$this->imageFile->fileExists($sourceImageFilename)) { + throw new ConvertorException('Source cached image does not exists ' . $sourceImageUri); + } + if (!$this->imageFile->needsConversion($sourceImageFilename, $destinationImageFilename)) { return true; }