diff --git a/classes/ImageResizer.php b/classes/ImageResizer.php index 198af4d..2719b37 100644 --- a/classes/ImageResizer.php +++ b/classes/ImageResizer.php @@ -93,6 +93,9 @@ class ImageResizer } foreach ($this->file->versions() as $version) { + if (!$this->disk->exists($version->get('path'))) { + throw new ResizerException('File versions cannot be generated. Version file "'.$version->get('path').'" of "'.$this->file->root().'" doesnt exist.'); + } $this->file->compressor()->make($this->disk->path($version->get('path'))); } }